Happy New Year everyone
PHP 8 can generate "Undefined variable" and "Passing null to parameter" warnings in zen_build_keyword_where_clause function (functions_strings.php, line 211)
Code:
function zen_build_keyword_where_clause($fields, $string, $startWithWhere = false)
{
global $db, $zco_notifier;
$zco_notifier->notify('NOTIFY_BUILD_KEYWORD_SEARCH', '', $fields, $string);
if (zen_parse_search_string(stripslashes($string), $search_keywords)) {
$where_str = " AND (";
...
}
if (substr($where_str, -7) === '( () )') {
return ' ';
}
return $where_str ?? ' ';
}
My quick suggestion:
Code:
if (!empty($where_str) AND substr($where_str, -7) === '( () )') {
return ' ';
}
Bookmarks