Skip to content

Commit 0f47712

Browse files
committed
parse embedded mappings only if value is a string
1 parent 4f13a76 commit 0f47712

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Yaml/Inline.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ private static function parseSequence($sequence, $flags, &$i = 0, $references =
397397
$value = self::parseScalar($sequence, $flags, array(',', ']'), array('"', "'"), $i, true, $references);
398398

399399
// the value can be an array if a reference has been resolved to an array var
400-
if (!is_array($value) && !$value instanceof \DateTimeInterface && !$isQuoted && false !== strpos($value, ': ')) {
400+
if (is_string($value) && !$isQuoted && false !== strpos($value, ': ')) {
401401
// embedded mapping?
402402
try {
403403
$pos = 0;

0 commit comments

Comments
 (0)