]> git.openstreetmap.org Git - nominatim.git/commitdiff
check correct variable for SQL error
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 1 Feb 2014 14:51:40 +0000 (15:51 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 1 Feb 2014 14:51:40 +0000 (15:51 +0100)
lib/lib.php

index a75c3af7f23f5bbd4e62ac81dcf97f4da9d16bf2..b2f85ca2a4f1f721c31ecf793ec0cc0b1714dc9c 100644 (file)
                        $sSQL .= ' ORDER BY ST_distance('.$sPointSQL.', geometry) ASC limit 1';
                        //var_dump($sSQL);
                        $aPlace = $oDB->getRow($sSQL);
-                       $iPlaceID = $aPlace['place_id'];
-                       if (PEAR::IsError($iPlaceID))
+                       if (PEAR::IsError($aPlace))
                        {
-                               var_Dump($sSQL, $iPlaceID);
+                               var_Dump($sSQL, $aPlace);
                                exit;
                        }
+                       $iPlaceID = $aPlace['place_id'];
                }
 
                // The point we found might be too small - use the address to find what it is a child of