Skip to content
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

Map parts type error - property_exists() passed an array #402

Open
samhibberd opened this issue Jul 23, 2024 · 0 comments
Open

Map parts type error - property_exists() passed an array #402

samhibberd opened this issue Jul 23, 2024 · 0 comments
Labels

Comments

@samhibberd
Copy link
Contributor

samhibberd commented Jul 23, 2024

Found a somewhat critical issue (for us anyway), during normalizeValue() there is a method that populates missing data / parts:

$map->parts = array_merge(
array_filter((array) $loc['parts']),
array_filter((array) $map->parts)
);

We recently identified that we were restricting our api key and as a result this call wasn't working (see ##296 (comment))

We temporarily worked around this by removing restrictions for our geoToken but as a result any unsaved events, that needed to be accessed via the front end were being normalized, grabbing missing data from google and setting it as an array on the Map model.

The the parts property on the map model can accept an array:

public PartsLegacy|Parts|array|null $parts = null;

Although if it is an array you are going to run into an error here:

property_exists($this->parts, $name) ||

Likely related to this:
#181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant