diff options
author | Christian Schneider | 2024-07-10 16:50:49 +0200 |
---|---|---|
committer | Christian Schneider | 2024-07-10 16:50:49 +0200 |
commit | c849c1025b70a42c42e832ebb9844f2d51657aed (patch) | |
tree | 830875146640aed0e275c609be61568f759c73ad | |
parent | b9be6472b1236f566015a1537f516d638635719e (diff) | |
download | itools-c849c1025b70a42c42e832ebb9844f2d51657aed.tar.gz itools-c849c1025b70a42c42e832ebb9844f2d51657aed.tar.bz2 itools-c849c1025b70a42c42e832ebb9844f2d51657aed.zip |
Work around idn_to_ascii not allowing empty string in PHP 8.4 by using non-empty but falsey string
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index de20007..8333f76 100644 --- a/it_url.class +++ b/it_url.class @@ -62,7 +62,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, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46) ?: $this->realhostname; # punycode or original + $this->realhostname = idn_to_ascii($this->realhostname ?: "0", IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46) ?: $this->realhostname; # punycode or original } |