From 4a595d458bf896135039fef382cbfb4b1a4e2555 Mon Sep 17 00:00:00 2001 From: Tom Beddard Date: Tue, 7 Feb 2006 17:51:42 +0000 Subject: [PATCH] Fixed an an undefined index issue when a topic was bumped by someone who hadn't posted in the topic (like an admin). Still not ideal as it won't state who bumped the topic in this case. git-svn-id: file:///svn/phpbb/trunk@5534 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 454dca6d27..cb2a6cc6ff 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1225,10 +1225,11 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } // Bump information - if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id']) + if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]) ) { // It is safe to grab the username from the user cache array, we are at the last - // post and only the topic poster and last poster are allowed to bump + // post and only the topic poster and last poster are allowed to bump. However, a + // check is still needed incase an admin bumped the topic (but didn't post in the topic) $l_bumped_by = '

' . sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time'])); } else