]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove unnecessary size check
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 2 Oct 2017 20:31:52 +0000 (22:31 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 2 Oct 2017 20:31:52 +0000 (22:31 +0200)
lib/Geocode.php

index 6961b6303dee407e84a57036f0a8fc551a24c595..80a959c28709299b901f3f29daf73a985ed4910d 100644 (file)
@@ -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) {