X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5e477e3b5b99da6fc4e54749d4671a6fc8fdcd66..ecf4693a799055b3795ca691337941f931cf0a59:/lib-php/website/details.php diff --git a/lib-php/website/details.php b/lib-php/website/details.php index 99307bbd..98fb6ef7 100644 --- a/lib-php/website/details.php +++ b/lib-php/website/details.php @@ -23,7 +23,7 @@ $aLangPrefOrder = $oParams->getPreferredLanguages(); $sPlaceId = $oParams->getString('place_id'); $sOsmType = $oParams->getSet('osmtype', array('N', 'W', 'R')); -$iOsmId = $oParams->getInt('osmid', -1); +$iOsmId = $oParams->getInt('osmid', 0); $sClass = $oParams->getString('class'); $bIncludeKeywords = $oParams->getBool('keywords', false); @@ -38,7 +38,7 @@ $oDB->connect(); $sLanguagePrefArraySQL = $oDB->getArraySQL($oDB->getDBQuotedList($aLangPrefOrder)); -if ($sOsmType && $iOsmId > 0) { +if ($sOsmType && $iOsmId !== 0) { $sSQL = 'SELECT place_id FROM placex WHERE osm_type = :type AND osm_id = :id'; $aSQLParams = array(':type' => $sOsmType, ':id' => $iOsmId); // osm_type and osm_id are not unique enough