You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the data function on line 96 of GoogleMaps_TemplatesService.php the inputted $data is decoded and then not used. On the next line (102) $data is being reset to a new GoogleMaps_MapDataModel that is empty because the decoded $data variable is not getting passed in, $value is getting passed in an is type hinted as a array, so I suspect it's being set to an empty array by default so it's not throwing an error.
GoogleMaps_TemplatesService.php -> data()
public function data($id, $data = '', $options = array())
{
if(is_string($data))
{
$data = json_decode($data);
$data = new GoogleMaps_MapDataModel((array) $value);
}
craft()->templates->includeJs('new GoogleMaps.MapData('.$id.','.$data->toJson().','.$this->jsonEncode($options).');');
}
Should be :
public function data($id, $data = '', $options = array())
{
if(is_string($data))
{
$data = json_decode($data);
$data = new GoogleMaps_MapDataModel((array) $data);
}
craft()->templates->includeJs('new GoogleMaps.MapData('.$id.','.$data->toJson().','.$this->jsonEncode($options).');');
}
The text was updated successfully, but these errors were encountered:
When calling the data function on line 96 of GoogleMaps_TemplatesService.php the inputted $data is decoded and then not used. On the next line (102) $data is being reset to a new GoogleMaps_MapDataModel that is empty because the decoded $data variable is not getting passed in, $value is getting passed in an is type hinted as a array, so I suspect it's being set to an empty array by default so it's not throwing an error.
GoogleMaps_TemplatesService.php -> data()
Should be :
The text was updated successfully, but these errors were encountered: