Skip to content

Commit

Permalink
bug #21117 [Yaml] add missing indicator character (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.2 branch.

Discussion
----------

[Yaml] add missing indicator character

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The comma was mentioned in the deprecation message, though it actually was never checked before in the condition.

Commits
-------

8725e0b [Yaml] add missing indicator character
  • Loading branch information
nicolas-grekas committed Jan 2, 2017
2 parents c90de86 + 8725e0b commit a89f60b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Yaml/Inline.php
Expand Up @@ -463,7 +463,7 @@ private static function parseMapping($mapping, $flags, &$i = 0, $references = ar
break;
}

if (!isset($mapping[$i + 1]) || !in_array($mapping[$i + 1], array(' ', '[', ']', '{', '}'), true)) {
if (!isset($mapping[$i + 1]) || !in_array($mapping[$i + 1], array(' ', ',', '[', ']', '{', '}'), true)) {
@trigger_error('Using a colon that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}" is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED);
}

Expand Down

0 comments on commit a89f60b

Please sign in to comment.