diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index 60dafce34..b7ea5b4de 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -159,7 +159,7 @@ function get_sql_search_clause($search) // ((field1 LIKE '%word1%' OR field2 LIKE '%word1%') // AND (field1 LIKE '%word2%' OR field2 LIKE '%word2%')) $word_clauses = array(); - $cat_ids_by_word = array(); + $cat_ids_by_word = $tag_ids_by_word = array(); foreach ($search['fields']['allwords']['words'] as $word) { $field_clauses = array(); diff --git a/index.php b/index.php index 0eb33a860..27058b468 100644 --- a/index.php +++ b/index.php @@ -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'];