Skip to content

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

Open
@samhibberd

Description

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions