From 1ee4e8b255c80e7baab6072c29e5705820d8d5d4 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 15 Oct 2014 13:41:27 -0600 Subject: [PATCH] Hotfix: certain blocks (weather) don't throw Exceptions on error They set enabled to false. Not sure how this is supposed to be fixed properly, but this prevents fatal errors --- framework/Core/lib/Horde/Core/Block/Layout/View.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/Core/lib/Horde/Core/Block/Layout/View.php b/framework/Core/lib/Horde/Core/Block/Layout/View.php index eeaf55165c8..4e92c9837c1 100644 --- a/framework/Core/lib/Horde/Core/Block/Layout/View.php +++ b/framework/Core/lib/Horde/Core/Block/Layout/View.php @@ -79,6 +79,10 @@ public function toHtml() $rowspan = $colspan = 1; try { $block = $bc->getBlock($item['app'], $item['params']['type2'], $item['params']['params']); + + if (!$block->enabled) { + throw new Horde_Exception('Block not enabled.'); + } $rowspan = $item['height']; $colspan = $item['width']; for ($i = 0; $i < $item['height']; $i++) {