bug #21117 [Yaml] add missing indicator character (xabbuh)

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
This commit is contained in:
Nicolas Grekas 2017-01-02 17:48:41 +01:00
commit a89f60bbe8

View File

@ -463,7 +463,7 @@ class Inline
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);
}