Description
Request of whois info for globaltools.dk produces error
strtolower() expects parameter 1 to be string, bool given in src/Iodev/Whois/Helpers/TextHelper.php, line 15
Possible Solution
Issue happens after adding declare(strict_types=1); in TextHelper.php.
A possible solution is cast to string: $srcEncoding = strtolower((string)mb_detect_encoding($text));
PHP-Whois version: 4.1.8
PHP version: 7.4, 8.1
Description
Request of whois info for
globaltools.dk
produces errorstrtolower() expects parameter 1 to be string, bool given
insrc/Iodev/Whois/Helpers/TextHelper.php, line 15
How to reproduce
Possible Solution
Issue happens after adding
declare(strict_types=1);
inTextHelper.php
. A possible solution is cast to string:$srcEncoding = strtolower((string)mb_detect_encoding($text));