Skip to content

Commit e168d9a

Browse files
authored
fix: regular expression
Due to a missing question mark the regular expression does not match strings ending with fa, fal, fals but only fae, fale and false.
1 parent d890396 commit e168d9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PadsJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function padLiteral($tmpJson)
4444
return $tmpJson;
4545
}
4646

47-
$match = \preg_match('/(tr?u?e?|fa?l?s?e|nu?l?l?)$/', $tmpJson, $matches);
47+
$match = \preg_match('/(tr?u?e?|fa?l?s?e?|nu?l?l?)$/', $tmpJson, $matches);
4848

4949
if (!$match || null === $literal = $this->maybeLiteral($matches[1])) {
5050
return $tmpJson;

0 commit comments

Comments
 (0)