X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d79a2bb17eef64945f776deae2e43068ecc05b65..27bc8d4f7bb907699dbb974e8159f75bead831c9:/lib/PlaceLookup.php diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index 41fdea89..bd6fa171 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -164,12 +164,12 @@ class PlaceLookup $aResults = $this->lookup(array($iPlaceID => new Result($iPlaceID))); - return sizeof($aResults) ? reset($aResults) : null; + return empty($aResults) ? null : reset($aResults); } public function lookup($aResults, $iMinRank = 0, $iMaxRank = 30) { - if (!sizeof($aResults)) { + if (empty($aResults)) { return array(); } $aSubSelects = array(); @@ -408,7 +408,7 @@ class PlaceLookup if (CONST_Debug) var_dump($aSubSelects); - if (!sizeof($aSubSelects)) { + if (empty($aSubSelects)) { return array(); }