Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  Fix passing null to trim()
  • Loading branch information
fabpot committed Oct 28, 2023
2 parents 63b478d + 9758b6c commit 245813a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
*/
public static function parse(string $value = null, int $flags = 0, array &$references = []): mixed
{
if (null === $value) {
return '';
}

self::initialize($flags);

$value = trim($value);
Expand Down
1 change: 1 addition & 0 deletions Tests/InlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ public static function getTestsForParse()
{
return [
['', ''],
[null, ''],
['null', null],
['false', false],
['true', true],
Expand Down

0 comments on commit 245813a

Please sign in to comment.