From 5ccfc08d097b14f08c4276d12ac5b7e91e89490e Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Tue, 4 Jul 2006 01:51:27 +0000 Subject: [PATCH] Fixed: PHP notices appear when a post uses an icon that does not exist anymore PS: that's my first CVS commit in a while, my fingers are crossed git-svn-id: file:///svn/phpbb/trunk@6143 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 28522cfc12..a449abb168 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -891,7 +891,9 @@ while ($row = $db->sql_fetchrow($result)) 'post_edit_time' => $row['post_edit_time'], 'post_edit_reason' => $row['post_edit_reason'], 'post_edit_user' => $row['post_edit_user'], - 'icon_id' => $row['icon_id'], + + // Make sure the icon actually exists + 'icon_id' => (isset($icons[$row['icon_id']]['img'], $icons[$row['icon_id']]['height'], $icons[$row['icon_id']]['width'])) ? $row['icon_id'] : 0, 'post_attachment' => $row['post_attachment'], 'post_approved' => $row['post_approved'], 'post_reported' => $row['post_reported'],