From 0c14f1d4697a770a32bb16621d3350a0b1e00f1e Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Thu, 19 Jun 2003 15:29:53 +0000 Subject: [PATCH] This checkin is sponsored by AOL git-svn-id: file:///svn/phpbb/trunk@4144 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_admin.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 8ce0975dc8..688240360d 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -663,11 +663,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, } } - $sql = 'UPDATE ' . TOPICS_TABLE . ' - SET topic_reported = 1 - topic_reported - WHERE topic_id IN (' . implode(', ', $topic_ids) . ')'; - $db->sql_query($sql); - unset($topic_ids); + if (count($topic_ids)) + { + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET topic_reported = 1 - topic_reported + WHERE topic_id IN (' . implode(', ', $topic_ids) . ')'; + $db->sql_query($sql); + } } $db->sql_freeresult($result);