Skip to content

php8.1 and php8.2 issues #32

@tubby1981

Description

@tubby1981

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions