Fix error if theme item is not supplied.

This commit is contained in:
Tim Almdal
2009-02-13 06:36:02 +00:00
parent 5dad40b1ae
commit 7ea06ccbcb
+3 -2
View File
@@ -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;