]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
utils/update.php: use fail() whenever possible for errors
[nominatim.git] / lib / Geocode.php
index 93498c334c0990197104ad92808942358bc9cb64..80561d27fd18232b372b1f6b7d24f1c8fab68932 100644 (file)
                function loadParamArray($aParams)
                {
                        if (isset($aParams['addressdetails'])) $this->bIncludeAddressDetails = (bool)$aParams['addressdetails'];
-                       if (isset($aParams['extratags'])) $this->bIncludeExtraTags = (bool)$aParams['extratags'];
-                       if (isset($aParams['namedetails'])) $this->bIncludeNameDetails = (bool)$aParams['namedetails'];
+                       if ((float) CONST_Postgresql_Version > 9.2)
+                       {
+                               if (isset($aParams['extratags'])) $this->bIncludeExtraTags = (bool)$aParams['extratags'];
+                               if (isset($aParams['namedetails'])) $this->bIncludeNameDetails = (bool)$aParams['namedetails'];
+                       }
                        if (isset($aParams['bounded'])) $this->bBoundedSearch = (bool)$aParams['bounded'];
                        if (isset($aParams['dedupe'])) $this->bDeDupe = (bool)$aParams['dedupe'];
 
                                        }
                                        else
                                        {
-                                               $aResult['sExtraTags'] = array();
+                                               $aResult['sExtraTags'] = (object) array();
                                        }
                                }
 
                                        }
                                        else
                                        {
-                                               $aResult['sNameDetails'] = array();
+                                               $aResult['sNameDetails'] = (object) array();
                                        }
                                }