Skip to content

Commit 014309c

Browse files
committed
bug #61869 [JsonPath] do not pass more than one byte to ord() (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [JsonPath] do not pass more than one byte to ord() | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT see php/php-src#19440 Commits ------- cbdcffc do not pass more than one byte to ord()
2 parents eca5410 + cbdcffc commit 014309c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Component/JsonPath/Tokenizer/JsonPathTokenizer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ public static function tokenize(JsonPath $query): array
8888
if ($inQuote) {
8989
// literal control characters (U+0000 through U+001F) in quoted strings
9090
// are not be allowed unless they are part of escape sequences
91-
$ord = \ord($char);
9291
if ($inBracket) {
93-
if ($ord <= 31) {
92+
if (\ord($char[0]) <= 31) {
9493
if (!self::isEscaped($chars, $i)) {
9594
throw new InvalidJsonPathException('control characters are not allowed in quoted strings.', $position);
9695
}

0 commit comments

Comments
 (0)