Skip to content

Commit

Permalink
parse embedded mappings only if value is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jun 17, 2016
1 parent 4f13a76 commit 0f47712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Yaml/Inline.php
Expand Up @@ -397,7 +397,7 @@ private static function parseSequence($sequence, $flags, &$i = 0, $references =
$value = self::parseScalar($sequence, $flags, array(',', ']'), array('"', "'"), $i, true, $references);

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

0 comments on commit 0f47712

Please sign in to comment.