From 1f1987131d7a4386439ae4b7ac65ff210f42c245 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 30 Dec 2007 12:17:12 +0000 Subject: [PATCH] Don't die on deleted images, fixes #252 git-svn-id: file:///home/shish/svn/shimmie2/trunk@676 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/report_image/theme.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/report_image/theme.php b/contrib/report_image/theme.php index f93ef88d..0e8f92d7 100755 --- a/contrib/report_image/theme.php +++ b/contrib/report_image/theme.php @@ -66,7 +66,12 @@ class ReportImageTheme extends Themelet { if($config->get_bool('report_image_show_thumbs')) { $image_obj_reported = $database->get_image($image_id); - return "
" . $this->build_thumb_html($image_obj_reported); + if($image_obj_reported) { + return "
" . $this->build_thumb_html($image_obj_reported); + } + else { + return "
Image not found -- bug!"; + } } } @@ -95,4 +100,4 @@ class ReportImageTheme extends Themelet { } } -?> \ No newline at end of file +?>