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

Appearance settings

[PropertyInfo] PropertyInfoCacheExtractor emits a warning #31929

Copy link
Copy link
Closed
@bastnic

Description

@bastnic
Issue body actions

Symfony version(s) affected: 4.3.1

Description
Since upgrade from 4.2.9 to 4.3.1, a Warning is sent on PropertyInfoCacheExtractor::extract

Warning : array_key_exists() expects parameter 2 to be array, null given => /var/www/project/apps/api/vendor/symfony/property-info/PropertyInfoCacheExtractor.php::124

How to reproduce
Not clear yet, I didn't narrow what the problem is yet, I don't have the problem on other project that use almost the same stack.

In test mode, it crashes because of sensibility, it works on prod mode.

Since this PR I presume #30525.

Possible Solution
On ligne 114, there is a first check:

if (\array_key_exists($encodedMethod, $this->arrayCache) && \array_key_exists($serializedArguments, $this->arrayCache[$encodedMethod])) {

On ligne 124, there is not:

if (\array_key_exists($serializedArguments, $data[$encodedMethod])) {

So we should add a check \array_key_exists($encodedMethod, $data). And maybe trace back what to do with it, as I have a lot of empty cache set because of that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.