aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Url.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-03-07 21:53:53 +0100
committerGitHub <noreply@github.com>2018-03-07 21:53:53 +0100
commit39ee93925b66b527c4386647001fadc898c52a2c (patch)
treeb8e0548c6ba1716b6c3f2bde9f81e8f4d913eeb2 /application/Url.php
parenta58a8856a88cefe22027d419fac2e5664fc9ba61 (diff)
parentd2d4f993e1e76bc68b65c48cb18476c404c97a41 (diff)
downloadShaarli-39ee93925b66b527c4386647001fadc898c52a2c.tar.gz
Shaarli-39ee93925b66b527c4386647001fadc898c52a2c.tar.zst
Shaarli-39ee93925b66b527c4386647001fadc898c52a2c.zip
Merge pull request #1097 from ArthurHoaro/fix/psr-elseif
PSR: use elseif instead of else if
Diffstat (limited to 'application/Url.php')
-rw-r--r--application/Url.php2
1 files changed, 1 insertions, 1 deletions
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)
81 // Protocol not allowed: we remove it and replace it with http 81 // Protocol not allowed: we remove it and replace it with http
82 if ($protocol === 1 && ! in_array($match[1], $protocols)) { 82 if ($protocol === 1 && ! in_array($match[1], $protocols)) {
83 $url = str_replace($match[0], 'http://', $url); 83 $url = str_replace($match[0], 'http://', $url);
84 } else if ($protocol !== 1) { 84 } elseif ($protocol !== 1) {
85 $url = 'http://' . $url; 85 $url = 'http://' . $url;
86 } 86 }
87 return $url; 87 return $url;