aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php4
1 files changed, 3 insertions, 1 deletions
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
{