diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-13 06:36:02 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-13 06:36:02 +0000 |
commit | 7ea06ccbcb5e38d4ffddad9a561cde546b1acd41 (patch) | |
tree | 514af9884ceaab54f7ce8ff7de29f8e78a883c26 /modules/exif/helpers/exif_theme.php | |
parent | 5dad40b1ae4b1aedce928dc2e3abac3b6b13c636 (diff) |
Fix error if theme item is not supplied.
Diffstat (limited to 'modules/exif/helpers/exif_theme.php')
-rw-r--r-- | modules/exif/helpers/exif_theme.php | 5 |
1 files changed, 3 insertions, 2 deletions
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; |