From 36f4f7eaace992bd0eeaec3215a1a589158164a3 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 10 Oct 2001 10:45:54 +0000 Subject: [PATCH] Fixed bug with deleting only post in forum git-svn-id: file:///svn/phpbb/trunk@1148 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index ddc3154b35..0370b5d36a 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1124,7 +1124,9 @@ if( ( $submit || $confirm ) && !$error ) message_die(GENERAL_ERROR, "Couldn't obtain new last post id for the forum", "", __LINE__, __FILE__, $sql); } - $new_last_sql = ", forum_last_post_id = " . $row['new_post_id']; + $last_post_id_forum = ( !empty($row['new_post_id']) ) ? $row['new_post_id'] : 0; + + $new_last_sql = ", forum_last_post_id = " . $last_post_id_forum; } else {