blob: 5cc5facc42ca75e6f10f4a2dbc2e9ef806211b10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From 1ee4e8b255c80e7baab6072c29e5705820d8d5d4 Mon Sep 17 00:00:00 2001
From: Michael M Slusarz <slusarz@horde.org>
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++) {
|