Skip to content

Commit f7c23a4

Browse files
committed
Fix chr() deprecation warning
Explicitly take the modulus.
1 parent 3374502 commit f7c23a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/PhpParser/Node/Scalar/String_.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function ($matches) {
124124
// If it overflowed to float, treat as INT_MAX, it will throw an error anyway.
125125
return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX);
126126
} else {
127-
return chr(octdec($str));
127+
return chr(octdec($str) & 255);
128128
}
129129
},
130130
$str

0 commit comments

Comments
 (0)