aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/Url.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-02-28 22:34:40 +0100
committerArthurHoaro <arthur@hoa.ro>2018-02-28 22:34:40 +0100
commitd2d4f993e1e76bc68b65c48cb18476c404c97a41 (patch)
tree833cf0646e7e7c195a8da9d5fee2812cd06f8a6d /application/Url.php
parentb70436373b488ce9cd8b0dc287d058b5ca206347 (diff)
downloadShaarli-d2d4f993e1e76bc68b65c48cb18476c404c97a41.tar.gz
Shaarli-d2d4f993e1e76bc68b65c48cb18476c404c97a41.tar.zst
Shaarli-d2d4f993e1e76bc68b65c48cb18476c404c97a41.zip
PSR: use elseif instead of else if
See https://www.php-fig.org/psr/psr-2/\#51-if-elseif-else
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;