Skip to content

Commit 7073433

Browse files
committed
Fix chr() deprecation warning
Explicitly take the modulus. (cherry picked from commit f7c23a4)
1 parent 4b8f8e5 commit 7073433

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
@@ -120,7 +120,7 @@ function($matches) {
120120
} elseif ('u' === $str[0]) {
121121
return self::codePointToUtf8(hexdec($matches[2]));
122122
} else {
123-
return chr(octdec($str));
123+
return chr(octdec($str) & 255);
124124
}
125125
},
126126
$str

0 commit comments

Comments
 (0)