Skip to content

[Cache] Prevent notice on case matching metadata trick #39420

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

bastnic
Copy link
Contributor

@bastnic bastnic commented Dec 9, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT

On saving an array of one element with a int key of strlen 10
it matches the first conditions of the trick used to save metadata.

Notice: Trying to access array offset on value of type int

Casting it to string fixes it.

@carsonbot carsonbot added this to the 5.1 milestone Dec 9, 2020
@bastnic bastnic force-pushed the feature/cache-metadata-cast-key branch from 941f9e8 to 4b7e8bb Compare December 9, 2020 23:22
@symfony symfony deleted a comment from majiayuan Dec 10, 2020
@nicolas-grekas nicolas-grekas modified the milestones: 5.1, 4.4 Dec 10, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(for 4.4)

On saving an array of one element with a int key of strlen 10
it matches the first conditions of the trick used to save metadata.

> Notice: Trying to access array offset on value of type int

Casting it to string fixes it.
@nicolas-grekas
Copy link
Member

Thank you @bastnic.

@nicolas-grekas nicolas-grekas merged commit f4a02b4 into symfony:4.4 Dec 10, 2020
@bastnic bastnic deleted the feature/cache-metadata-cast-key branch December 10, 2020 08:58
This was referenced Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants