Skip to content

Commit c36903b

Browse files
committed
Evaluator: Fix "ord(): Providing a string that is not one byte long is deprecated."
Bug: T411014 Change-Id: If2348bc2ca8024154061c0dc2f1da414884987ba
1 parent 036a5ba commit c36903b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Evaluator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static function evaluateCompiled( $number, array $rules ): int {
9292
$nine = ord( '9' );
9393

9494
foreach ( explode( ' ', $rule ) as $token ) {
95-
$ord = ord( $token );
95+
$ord = ord( $token[0] );
9696
if ( isset( $operandSymbols[$token] ) ) {
9797
$stack[] = $operandSymbols[$token];
9898
} elseif ( $ord >= $zero && $ord <= $nine ) {

0 commit comments

Comments
 (0)