diff --git a/src/helpers/UrlHelper.php b/src/helpers/UrlHelper.php index 4efd6595f..0c316fbbd 100644 --- a/src/helpers/UrlHelper.php +++ b/src/helpers/UrlHelper.php @@ -287,7 +287,7 @@ public static function getSiteUrlOverrideSetting(?int $siteId = null): string */ public static function encodeUrl(string $url): string { - $parts = preg_split('/([:\/?#\[\]@!$&\'()*+,;=%])/', $url, null, PREG_SPLIT_DELIM_CAPTURE); + $parts = preg_split('/([:\/?#\[\]@!$&\'()*+,;=%])/', $url, -1, PREG_SPLIT_DELIM_CAPTURE); $url = ''; foreach ($parts as $i => $part) { if ($i % 2 === 0) {