Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught TypeError: preg_match() #220

Open
dehlirious opened this issue Mar 8, 2024 · 1 comment
Open

Fatal error: Uncaught TypeError: preg_match() #220

dehlirious opened this issue Mar 8, 2024 · 1 comment

Comments

@dehlirious
Copy link

PHP-Whois version: 4.1.1(latest)

PHP version: 8.3

Description

PHP Fatal error:  Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php:430
Stack trace:
#0 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php(430): preg_match()
#1 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php(364): Iodev\Whois\Modules\Tld\Parsers\BlockParser->parseDate()
#2 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php(116): Iodev\Whois\Modules\Tld\Parsers\BlockParser->parseCreationDate()
#3 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/AutoParser.php(72): Iodev\Whois\Modules\Tld\Parsers\BlockParser->parseResponse()
#4 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/TldModule.php(204): Iodev\Whois\Modules\Tld\Parsers\AutoParser->parseResponse()
#5 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/TldModule.php(178): Iodev\Whois\Modules\Tld\TldModule->loadParsedTo()
#6 vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/TldModule.php(137): Iodev\Whois\Modules\Tld\TldModule->loadDomainData()
#7 vendor/io-developer/php-whois/src/Iodev/Whois/Whois.php(119): Iodev\Whois\Modules\Tld\TldModule->loadDomainInfo()
#8 tld.php(206): Iodev\Whois\Whois->loadDomainInfo()
#9 {main}
  thrown in vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php on line 430

How to reproduce
Absolutely No idea! I'm doing >100k scans and this issue has only popped up less than ten times. Sadly, I did Not capture what domain, what TLD this error occurred on. All I can say, is that it was a ccTLD

Possible Solution
How to fix the root issue? No idea!
How to potentially slap a bandaid on it? (untested)
&& is_string($str) in if ($str && is_string($str) && preg_match($fallbackRegex, $str)) { (BlockParser.php:430)

Additional context
N/a

@decadence
Copy link

I got preg_match(): Argument #2 ($subject) must be of type string, array given with domain herbalife.by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants