diff options
author | David M <davidmj@users.sourceforge.net> | 2007-03-01 21:43:27 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-03-01 21:43:27 +0000 |
commit | 616dc8adf5b92d77e885d48d992d30ac22364d6c (patch) | |
tree | f3340832ab8c6bc420022e796052feb040f0d265 /phpBB/includes/functions_posting.php | |
parent | 79d159913525d6f361f7664904a13203c9bc3dcc (diff) | |
download | forums-616dc8adf5b92d77e885d48d992d30ac22364d6c.tar forums-616dc8adf5b92d77e885d48d992d30ac22364d6c.tar.gz forums-616dc8adf5b92d77e885d48d992d30ac22364d6c.tar.bz2 forums-616dc8adf5b92d77e885d48d992d30ac22364d6c.tar.xz forums-616dc8adf5b92d77e885d48d992d30ac22364d6c.zip |
- small issue
git-svn-id: file:///svn/phpbb/trunk@7103 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index e03641e5aa..00f7b73eb1 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -903,7 +903,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $rowset = array(); while ($row = $db->sql_fetchrow($result)) { - $rowset[] = $row; + $rowset[$row['post_id']] = $row; $bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']); } $db->sql_freeresult($result); @@ -915,8 +915,17 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $bbcode = new bbcode(base64_encode($bbcode_bitfield)); } - foreach ($rowset as $i => $row) + for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) { + // A non-existing rowset only happens if there was no user present for the entered poster_id + // This could be a broken posts table. + if (!isset($rowset[$post_list[$i]])) + { + continue; + } + + $row =& $rowset[$post_list[$i]]; + $poster_id = $row['user_id']; $post_subject = $row['post_subject']; $message = censor_text($row['post_text']); |