From: Sarah Hoffmann Date: Mon, 2 Oct 2017 20:31:52 +0000 (+0200) Subject: remove unnecessary size check X-Git-Tag: v3.1.0~64 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/2deac34648049a6cb9dc897abe15cbd423358f52 remove unnecessary size check --- diff --git a/lib/Geocode.php b/lib/Geocode.php index 6961b630..80a959c2 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1124,14 +1124,10 @@ class Geocode if (CONST_Debug) var_Dump($sSQL); $aValidTokens = array(); - if (sizeof($aTokens)) { - $aDatabaseWords = chksql( - $this->oDB->getAll($sSQL), - "Could not get word tokens." - ); - } else { - $aDatabaseWords = array(); - } + $aDatabaseWords = chksql( + $this->oDB->getAll($sSQL), + "Could not get word tokens." + ); $aPossibleMainWordIDs = array(); $aWordFrequencyScores = array(); foreach ($aDatabaseWords as $aToken) {