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,12 +220,18 @@ if ($bIncludeKeywords) {
$aPlaceSearchName = $oDB->getRow($sSQL);
if (!empty($aPlaceSearchName)) {
$sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['name_vector'], 1, -1).')';
$sWordIds = substr($aPlaceSearchName['name_vector'], 1, -1);
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);
if (!empty($sWordIds)) {
$sSQL = 'SELECT * FROM word WHERE word_id in ('.$sWordIds.')';
$aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
}
}
}
logEnd($oDB, $hLog, 1);