From: Eldar Yusupov Date: Sat, 26 Oct 2019 17:18:46 +0000 (+0300) Subject: Handle zero in getCol() X-Git-Tag: v3.5.0~142^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b54fca4f7ee7aec899689c7561d5ee86535a2c40?ds=sidebyside Handle zero in getCol() --- diff --git a/lib/DB.php b/lib/DB.php index 51fd49fc..fe2529b2 100644 --- a/lib/DB.php +++ b/lib/DB.php @@ -135,7 +135,7 @@ class DB try { $stmt = $this->getQueryStatement($sSQL, $aInputVars, $sErrMessage); - while ($val = $stmt->fetchColumn(0)) { // returns first column or false + while (($val = $stmt->fetchColumn(0)) !== false) { // returns first column or false $aVals[] = $val; } } catch (\PDOException $e) {