diff options
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 6 |
1 files changed, 3 insertions, 3 deletions
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"); |