From 7ea06ccbcb5e38d4ffddad9a561cde546b1acd41 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 13 Feb 2009 06:36:02 +0000 Subject: Fix error if theme item is not supplied. --- modules/exif/helpers/exif_theme.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/exif/helpers') diff --git a/modules/exif/helpers/exif_theme.php b/modules/exif/helpers/exif_theme.php index e7174b4d..73ec0200 100644 --- a/modules/exif/helpers/exif_theme.php +++ b/modules/exif/helpers/exif_theme.php @@ -19,11 +19,12 @@ */ class exif_theme_Core { static function sidebar_bottom($theme) { - if ($theme->item()->is_photo()) { + $item = $theme->item(); + if ($item && $item->is_photo()) { $view = new View("exif_sidebar.html"); $csrf = access::csrf_token(); - $view->url = url::site("exif/show/{$theme->item()->id}?csrf=$csrf"); + $view->url = url::site("exif/show/{$item->id}?csrf=$csrf"); return $view; } return null; -- cgit v1.2.3