summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-15 21:23:00 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-15 21:23:00 +0000
commit2f8b4df0f564c883d7cdcf07936ce639b806a322 (patch)
treeb024adde97897a91e3a7c06a9460f28b0f2dd0a5 /core/helpers
parent743ffe96ed148bbc780ad5679da44dc8064cbb17 (diff)
Protect menus and blocks against the fact that we don't have an item
on tag pages.
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/core_block.php2
-rw-r--r--core/helpers/core_menu.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php
index abaa9205..7f756b92 100644
--- a/core/helpers/core_block.php
+++ b/core/helpers/core_block.php
@@ -25,7 +25,7 @@ class core_block_Core {
$profiler->render();
}
- if (access::can("edit", $theme->item())) {
+ if ($theme->item() && access::can("edit", $theme->item())) {
return new View("in_place_edit.html");
}
}
diff --git a/core/helpers/core_menu.php b/core/helpers/core_menu.php
index daf27ac1..c375e8b1 100644
--- a/core/helpers/core_menu.php
+++ b/core/helpers/core_menu.php
@@ -40,7 +40,7 @@ class core_menu_Core {
$menu->append($admin_menu);
}
- if (access::can("edit", $item)) {
+ if ($item && access::can("edit", $item)) {
$menu->append(
Menu::factory("submenu")
->id("options_menu")