if nameaddress_vector was {} the database queries failed

This commit is contained in:
marc tobias 2019-03-26 17:59:27 +01:00
parent c78a64ec9b
commit 850ab6999c

View File

@ -220,11 +220,17 @@ if ($bIncludeKeywords) {
$aPlaceSearchName = $oDB->getRow($sSQL); $aPlaceSearchName = $oDB->getRow($sSQL);
if (!empty($aPlaceSearchName)) { if (!empty($aPlaceSearchName)) {
$sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['name_vector'], 1, -1).')'; $sWordIds = substr($aPlaceSearchName['name_vector'], 1, -1);
$aPlaceSearchNameKeywords = $oDB->getAll($sSQL); if (!empty($sWordIds)) {
$sSQL = 'SELECT * FROM word WHERE word_id in ('.$sWordIds.')';
$aPlaceSearchNameKeywords = $oDB->getAll($sSQL);
}
$sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['nameaddress_vector'], 1, -1).')'; $sWordIds = substr($aPlaceSearchName['nameaddress_vector'], 1, -1);
$aPlaceSearchAddressKeywords = $oDB->getAll($sSQL); if (!empty($sWordIds)) {
$sSQL = 'SELECT * FROM word WHERE word_id in ('.$sWordIds.')';
$aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
}
} }
} }