Skip to content

Commit

Permalink
Run geocode_fields through array_values after array_unique, otherwise…
Browse files Browse the repository at this point in the history
… it winds up being an object instead of an array after json_encoding, which blows up the map init.
  • Loading branch information
cheesegrits committed Jul 21, 2016
1 parent c8cbcee commit cbf0cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/fabrik_element/googlemap/googlemap.php
Expand Up @@ -344,7 +344,7 @@ public function elementJavascript($repeatCounter)
}

// remove any duplicates in case they have misunderstood and selected the same element for all fields
$opts->geocode_fields = array_unique($opts->geocode_fields);
$opts->geocode_fields = array_values(array_unique($opts->geocode_fields));
}

$opts->reverse_geocode = $params->get('fb_gm_reverse_geocode', '0') == '0' ? false : true;
Expand Down

0 comments on commit cbf0cdc

Please sign in to comment.