X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUrl.php;h=6b9870f0c1bb468ebafd67e2d71123411f598a0c;hb=d2d4f993e1e76bc68b65c48cb18476c404c97a41;hp=21c17eccaa25644c72134795570cff816e2dad8d;hpb=28df9fa4f7d901632e7fd6e23b6d7dd345f1f6e7;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Url.php b/application/Url.php index 21c17ecc..6b9870f0 100644 --- a/application/Url.php +++ b/application/Url.php @@ -81,7 +81,7 @@ function whitelist_protocols($url, $protocols) // Protocol not allowed: we remove it and replace it with http if ($protocol === 1 && ! in_array($match[1], $protocols)) { $url = str_replace($match[0], 'http://', $url); - } else if ($protocol !== 1) { + } elseif ($protocol !== 1) { $url = 'http://' . $url; } return $url;