Skip to content

Commit 63ff2e0

Browse files
committed
Fix PHP 8.5 deprecation
Passing strings of more than one byte to ord() is deprecated in PHP 8.5. This change ensures that ord() is only called if the string is one byte.
1 parent 8608e9c commit 63ff2e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Util/UrlEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function unescapeAndEncode(string $uri): string
5656
}
5757
}
5858

59-
if (\ord($code) < 128) {
59+
if (\strlen($code) === 1 && \ord($code) < 128) {
6060
$result .= self::ENCODE_CACHE[\ord($code)];
6161
continue;
6262
}

0 commit comments

Comments
 (0)