php-whois
php-whois copied to clipboard
Some domains trigger a "PHP warning: preg_match() expects parameter 2 to be string, array given"
PHP-Whois version: 4.1.2
PHP version: 7.4.22
Description
PHP Warning: preg_match() expects parameter 2 to be string, array given in <redacted>/vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php on line 428
Warning: preg_match() expects parameter 2 to be string, array given in <redacted>/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php on line 428
PHP Warning: preg_match() expects parameter 2 to be string, array given in <redacted>/vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php on line 428
Warning: preg_match() expects parameter 2 to be string, array given in <redacted>/vendor/io-developer/php-whois/src/Iodev/Whois/Modules/Tld/Parsers/BlockParser.php on line 428
How to reproduce
<?php
include 'vendor/autoload.php';
use Iodev\Whois\Factory;
$whois = Factory::get()->createWhois();
$res = $whois->isDomainAvailable('cloudflare.com');
echo $res ? 'Available' : 'Not available';
I think it's related to #153