Skip to content

Commit 31bd20a

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: Fix passing null to trim()
2 parents e8fe851 + 0cef1e4 commit 31bd20a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Symfony/Component/Yaml/Inline.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
5757
*/
5858
public static function parse(string $value = null, int $flags = 0, array &$references = []): mixed
5959
{
60+
if (null === $value) {
61+
return '';
62+
}
63+
6064
self::initialize($flags);
6165

6266
$value = trim($value);

src/Symfony/Component/Yaml/Tests/InlineTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ public static function getTestsForParse()
318318
{
319319
return [
320320
['', ''],
321+
[null, ''],
321322
['null', null],
322323
['false', false],
323324
['true', true],

0 commit comments

Comments
 (0)