Issue #1. Fix constructors to be PHP7 compatible

This commit is contained in:
David Saez 2018-05-21 11:11:14 +02:00
parent ab82be9b47
commit 25d39b0468
3 changed files with 5 additions and 5 deletions

View file

@ -68,7 +68,7 @@ class WhoisClient {
/*
* Constructor function
*/
function WhoisClient () {
function __construct () {
// Load DATA array
@require('whois.servers.php');

View file

@ -91,7 +91,7 @@ class idna_convert
var $_strict_mode = false; // Behave strict or not
// The constructor
function idna_convert($options = false)
function __construct($options = false)
{
$this->slast = $this->_sbase + $this->_lcount * $this->_vcount * $this->_tcount;
if (function_exists('file_get_contents')) {

View file

@ -48,7 +48,7 @@ class Whois extends WhoisClient
/*
* Constructor function
*/
function Whois()
function __construct()
{
// Load DATA array
@require('whois.servers.php');
@ -109,7 +109,7 @@ class Whois extends WhoisClient
$ip = @gethostbyname($query);
if (isset($this->WHOIS_SPECIAL['ip']))
{
{
$this->Query['server'] = $this->WHOIS_SPECIAL['ip'];
$this->Query['args'] = $ip;
}
@ -133,7 +133,7 @@ class Whois extends WhoisClient
$ip = @gethostbyname($query);
if (isset($this->WHOIS_SPECIAL['ip']))
{
{
$this->Query['server'] = $this->WHOIS_SPECIAL['ip'];
}
else