From afc8c9ba25a69f5f4c86793ab24fe0b9fb1dfb3f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 30 Aug 2003 12:59:29 +0000 Subject: [PATCH] oops git-svn-id: file:///svn/phpbb/trunk@4461 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index 8baf6a1d3b..e89fcb9389 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -681,14 +681,14 @@ if ($submit || $preview || $refresh) // Check if we want to de-globalize the topic... and ask for new forum if ($topic_type != POST_GLOBAL) { - $sql = 'SELECT forum_id + $sql = 'SELECT topic_type, forum_id FROM ' . TOPICS_TABLE . " WHERE topic_id = $topic_id"; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); - if ((int)$row['forum_id'] == 0) + if ($row && (int)$row['forum_id'] == 0 && $row['topic_type'] == POST_GLOBAL) { $to_forum_id = (!empty($_REQUEST['to_forum_id'])) ? (int) $_REQUEST['to_forum_id'] : 0;