php8.1 and php8.2 issues
I got timeouts in PHP 8.2 when searching for certain IPv6 addresses and was able to solve this
######## php 8.1 ########
Automatic conversion of false to array is deprecated in src/whois.parser.php on line 93
if ($newblock && $hasdata) { $blocks = array(); // added this in the code $blocks[$gkey] = $block; $block = array(); $gkey = ''; }
######## php 8.2 ########
Deprecated: Creation of dynamic property idna_convert::$slast is deprecated in src/whois.idna.php on line 96
class idna_convert { /** * Holds all relevant mapping tables, loaded from a seperate file on construct * See RFC3454 for details * * @var array * @access private */ public $slast; // added this in the code
With the above code changes the script works again, but there are still deprecated messages.
- Deprecated: Creation of dynamic property Whois::$deepWhois is deprecated
- Deprecated: Creation of dynamic property ripe_handler::$deep_whois is deprecated in src/whois.client.php on line 467
- Warning: Undefined array key "main" insrc/whois.parser.php on line 37
Warning: Undefined array key "main" insrc/whois.parser.php on line 37
changed line 37 `from: if (empty($blocks) || !is_array($blocks['main']))
to:
if (empty($blocks) || (isset($blocks['main']) && !is_array($blocks['main'])))`