summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-03 17:01:33 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-03 17:01:33 -0700
commit05d18da3908ff872f0f726affe1babee975084d8 (patch)
treefe63161f4c933b0e6c151c420c63f797a008d311 /modules
parentbec2fdf7c485f4658fb1395bf11e1bf7bf601efb (diff)
Guard against pages with no items.
Diffstat (limited to 'modules')
-rw-r--r--modules/server_add/helpers/server_add_menu.php2
1 files changed, 1 insertions, 1 deletions
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