[search] avoid errors when a filter returns no item

This commit is contained in:
plegall
2023-10-28 18:35:20 +02:00
parent c94313fdc3
commit 13ea43e2ef
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -367,11 +367,11 @@ SELECT
ORDER BY counter DESC
;';
$added_by = query2array($query);
$user_ids = array();
if (count($added_by) > 0)
{
// now let's find the usernames of added_by users
$user_ids = array();
foreach ($added_by as $i)
{
$user_ids[] = $i['added_by_id'];