From bab7ba3071ef81a0a8e0727e11b81bfd4e3ba9ef Mon Sep 17 00:00:00 2001 From: Elanor Date: Thu, 9 Jan 2025 11:35:35 -0500 Subject: [PATCH] Update UrlHelper.php Version 3.9.10 contained php8 only code, so this will fix it for everyone still using PHP 7 - fixes #1560 --- src/helpers/UrlHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/UrlHelper.php b/src/helpers/UrlHelper.php index dbef995b0..4efd6595f 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, flags: PREG_SPLIT_DELIM_CAPTURE); + $parts = preg_split('/([:\/?#\[\]@!$&\'()*+,;=%])/', $url, null, PREG_SPLIT_DELIM_CAPTURE); $url = ''; foreach ($parts as $i => $part) { if ($i % 2 === 0) {