From 5e5042e52ac8a204a129412ef7c7309b677a058b Mon Sep 17 00:00:00 2001 From: Alfredo Ramos <alfredo.ramos.sanchez@gmail.com> Date: Tue, 12 Nov 2019 00:40:06 -0600 Subject: [PATCH] [ticket/16205] Fix undefined zebra variable PHPBB3-16205 --- phpBB/search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/search.php b/phpBB/search.php index 8dde46f999..bd8025dae5 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -720,6 +720,8 @@ if ($keywords || $author || $author_id || $search_id || $submit) if ($sql_where) { + $zebra = []; + if ($show_results == 'posts') { // @todo Joining this query to the one below? @@ -728,7 +730,6 @@ if ($keywords || $author || $author_id || $search_id || $submit) WHERE user_id = ' . $user->data['user_id']; $result = $db->sql_query($sql); - $zebra = array(); while ($row = $db->sql_fetchrow($result)) { $zebra[($row['friend']) ? 'friend' : 'foe'][] = $row['zebra_id'];