From 05d18da3908ff872f0f726affe1babee975084d8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 3 Jun 2009 17:01:33 -0700 Subject: Guard against pages with no items. --- modules/server_add/helpers/server_add_menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/server_add/helpers') diff --git a/modules/server_add/helpers/server_add_menu.php b/modules/server_add/helpers/server_add_menu.php index bcfe208b..23878913 100644 --- a/modules/server_add/helpers/server_add_menu.php +++ b/modules/server_add/helpers/server_add_menu.php @@ -30,7 +30,7 @@ class server_add_menu_Core { $item = $theme->item(); $paths = unserialize(module::get_var("server_add", "authorized_paths")); - if (user::active()->admin && $item->is_album() && !empty($paths)) { + if ($item && user::active()->admin && $item->is_album() && !empty($paths)) { // This is a little tricky. Normally there's an "Add Photo" menu option, but we want to // turn that into a dropdown if there are two different ways to add things. Do that in a // portable way for now. If we find ourselves duplicating this pattern, we should make an -- cgit v1.2.3