// 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;