Skip to content

Commit

Permalink
Hotfix: certain blocks (weather) don't throw Exceptions on error
Browse files Browse the repository at this point in the history
They set enabled to false.  Not sure how this is supposed to be fixed
properly, but this prevents fatal errors
  • Loading branch information
slusarz committed Oct 15, 2014
1 parent 6175c19 commit 1ee4e8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/Core/lib/Horde/Core/Block/Layout/View.php
Expand Up @@ -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++) {
Expand Down

0 comments on commit 1ee4e8b

Please sign in to comment.