- $sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['name_vector'], 1, -1).')';
- $aPlaceSearchNameKeywords = $oDB->getAll($sSQL);
- if (PEAR::isError($aPlaceSearchNameKeywords)) { // possible timeout
- $aPlaceSearchNameKeywords = [];
- }
+ if (!empty($aPlaceSearchName)) {
+ $sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['name_vector'], 1, -1).')';
+ $aPlaceSearchNameKeywords = $oDB->getAll($sSQL);
+ if (PEAR::isError($aPlaceSearchNameKeywords)) { // possible timeout
+ $aPlaceSearchNameKeywords = [];
+ }