aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2006-07-04 01:51:27 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2006-07-04 01:51:27 +0000
commit5ccfc08d097b14f08c4276d12ac5b7e91e89490e (patch)
treebbe9797e04535aa9266451ece191e6eb69eb547a /phpBB/viewtopic.php
parent9118c5ad835f27d8c96c08333ccb66400d0574b2 (diff)
downloadforums-5ccfc08d097b14f08c4276d12ac5b7e91e89490e.tar
forums-5ccfc08d097b14f08c4276d12ac5b7e91e89490e.tar.gz
forums-5ccfc08d097b14f08c4276d12ac5b7e91e89490e.tar.bz2
forums-5ccfc08d097b14f08c4276d12ac5b7e91e89490e.tar.xz
forums-5ccfc08d097b14f08c4276d12ac5b7e91e89490e.zip
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
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 3 insertions, 1 deletions
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'],