Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 2 commits intosymfony:3.1fromxabbuh:backport-19029
Jun 17, 2016

Conversation

@xabbuh
Copy link
Member

QA
Branch?3.1
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#19029
LicenseMIT
Doc PR

The new handling forDateTimeInterface instances was introduced in Symfony 3.1.


// 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,':')) {
Copy link
Member

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

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

indeed, changed accordingly

@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commit0f47712 intosymfony:3.1Jun 17, 2016
fabpot added a commit that referenced this pull requestJun 17, 2016
…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
@xabbuhxabbuh deleted the backport-19029 branchJune 17, 2016 14:25
@fabpotfabpot mentioned this pull requestJun 30, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@fabpot@stof@carsonbot@jkphl

[8]ページ先頭

©2009-2025 Movatter.jp