diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-02-28 22:34:40 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-02-28 22:34:40 +0100 |
commit | d2d4f993e1e76bc68b65c48cb18476c404c97a41 (patch) | |
tree | 833cf0646e7e7c195a8da9d5fee2812cd06f8a6d /application/Url.php | |
parent | b70436373b488ce9cd8b0dc287d058b5ca206347 (diff) | |
download | Shaarli-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.php | 2 |
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; |