]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/template/search-geocodejson.php
decode_json() always create arrays instead of objects
[nominatim.git] / lib-php / template / search-geocodejson.php
index 5439e3cfe532e61140a3293701d8a1a5c6517926..bba41a0d2210532c30afe3f7c0e34ddde0b4df68 100644 (file)
@@ -46,7 +46,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
     }
 
     if (isset($aPointDetails['asgeojson'])) {
-        $aPlace['geometry'] = json_decode($aPointDetails['asgeojson']);
+        $aPlace['geometry'] = json_decode($aPointDetails['asgeojson'], true);
     } else {
         $aPlace['geometry'] = array(
                                'type' => 'Point',