From 2b13737e9299317c865f72f4a276ea0b733c4f5f Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 2 Sep 2019 17:14:43 +0200 Subject: Make itools a bit stricter, new PHP versions start to enforce more declarations --- it_url.class | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'it_url.class') diff --git a/it_url.class b/it_url.class index 12ac64a..80b7a44 100644 --- a/it_url.class +++ b/it_url.class @@ -59,7 +59,7 @@ function __construct($url = null) $this->hostname = preg_replace('/^www\./', '', $this->realhostname); $this->path = ltrim($comp['path'] . ($comp['query'] ? '?' . $comp['query'] : ''), '/'); # $this->path is named poorly, it includes path and query $this->url = "$this->protocol://$this->realhostname" . ($this->port != $protoport ? $this->explicitport : '') . "/$this->path"; - $this->realhostname = idn_to_ascii($this->realhostname) ?: $this->realhostname; # punycode or original + $this->realhostname = idn_to_ascii($this->realhostname, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46) ?: $this->realhostname; # punycode or original } @@ -316,7 +316,7 @@ function request($p=array()) * @return array of contents (or false for errors like timesou) of resulting page using same * keys as the urls input array, considering redirects, excluding headers */ -function get_multi($p=null) +static function get_multi($p=null) { $p += array('retries' => 1); @@ -453,7 +453,7 @@ static function get_cache_filename($p) * @param $p['returnheaders'] Return array($path, $headers) instead of simply $path * @return Cache filename or false if fetch failed */ -function get_cache($p = array()) +static function get_cache($p = array()) { if (!$p['id'] && $p['maxage']) it::error("calling get_cache with maxage and without id"); -- cgit v1.2.3