From 5928c8d65301ab6f33188f79fdccbe3c5867546c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 30 Oct 2014 12:43:04 +0100 Subject: php-horde-Horde-Core: add upstream patch to avoid error on front page from an unconfigured block --- Horde_Core-upstream.patch | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Horde_Core-upstream.patch (limited to 'Horde_Core-upstream.patch') diff --git a/Horde_Core-upstream.patch b/Horde_Core-upstream.patch new file mode 100644 index 0000000..5cc5fac --- /dev/null +++ b/Horde_Core-upstream.patch @@ -0,0 +1,27 @@ +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 eeaf551..4e92c98 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++) { -- cgit