Hello, the whois.parser.php file contains two array initialization statements with syntax compatible only with PHP versions greater than or equal to 5.4, which generates the following error during execution on older PHP versions:
PHP Parse error: syntax error, unexpected '[' in /var/www/inc/phpWhois.org-master/src/whois.parser.php on line 341
PHP Parse error: syntax error, unexpected '[' in /var/www/inc/phpWhois.org-master/src/whois.parser.php on line 408
To maintain compatibility with older versions of PHP you can change the initialization of these variables from "[]" to "array()" in the following two lines:
Hello, the whois.parser.php file contains two array initialization statements with syntax compatible only with PHP versions greater than or equal to 5.4, which generates the following error during execution on older PHP versions:
PHP Parse error: syntax error, unexpected '[' in /var/www/inc/phpWhois.org-master/src/whois.parser.php on line 341 PHP Parse error: syntax error, unexpected '[' in /var/www/inc/phpWhois.org-master/src/whois.parser.php on line 408
To maintain compatibility with older versions of PHP you can change the initialization of these variables from "[]" to "array()" in the following two lines:
Line 341: Current:
$r = [];
Suggested change:$r = array();
Line 408: Current:
if (!isset($array[$key])) $array[$key] = [];
Suggested change:if (!isset($array[$key])) $array[$key] = array();