Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[YAML] Fixed parsing problem with nested DateTime lists#19081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| // the value can be an array if a reference has been resolved to an array var | ||
| if (!is_array($value) && !$isQuoted &&false !==strpos($value,':')) { | ||
| if (!is_array($value) && !$valueinstanceof \DateTimeInterface && !$isQuoted &&false !==strpos($value,':')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I would replace the first parts byis_string($value). The strpos condition can pass only for strings anyway, not for integers or floats, so it is useless to try it for them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
indeed, changed accordingly
fabpot commentedJun 17, 2016
Thank you@xabbuh. |
…kphl, xabbuh)This PR was merged into the 3.1 branch.Discussion----------[YAML] Fixed parsing problem with nested DateTime lists| Q | A| ------------- | ---| Branch? | 3.1| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#19029| License | MIT| Doc PR |The new handling for `DateTimeInterface` instances was introduced in Symfony 3.1.Commits-------0f47712 parse embedded mappings only if value is a string4f13a76 [YAML] Fixed parsing problem with nested DateTime lists
The new handling for
DateTimeInterfaceinstances was introduced in Symfony 3.1.