avoid double encoding of Punycode as with php-5.6 the 'new' idna class throws exceptions, thx to housequake

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-08-26 09:41:19 +02:00
parent 2f6e34d878
commit b162fb6e99
2 changed files with 6 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ function correctErrorDocument($errdoc = null) {
// not a URL
if ((strtoupper(substr($errdoc, 0, 5)) != 'HTTP:'
&& strtoupper(substr($errdoc, 0, 6)) != 'HTTPS:')
|| !validateUrl($idna_convert->encode($errdoc))
|| !validateUrl($errdoc)
) {
// a file
if (substr($errdoc, 0, 1) != '"') {