Skip to content

Commit bf6cf1b

Browse files
authored
[3.x][PHP8.5] Passing a string which is not a single byte to ord() is deprecated (#63)
https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_string_which_are_not_one_byte_long_to_ord
1 parent 0b3d335 commit bf6cf1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/phputf8/ord.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
function utf8_ord($chr)
2323
{
24-
$ord0 = ord($chr);
24+
$ord0 = ord($chr[0]);
2525

2626
if ($ord0 >= 0 && $ord0 <= 127) {
2727
return $ord0;

0 commit comments

Comments
 (0)