Don't accidentally add a block if trying to find parameters for a block that
authorJan Schneider <jan@horde.org>
Wed, 22 Sep 2010 13:58:25 +0000 (15:58 +0200)
committerJan Schneider <jan@horde.org>
Wed, 22 Sep 2010 13:58:25 +0000 (15:58 +0200)
doesn't exist.

framework/Block/lib/Horde/Block/Collection.php

index b3fc93b..61b7e58 100644 (file)
@@ -405,6 +405,10 @@ class Horde_Block_Collection
      */
     public function getParams($app, $block)
     {
+        if (!isset($this->_blocks[$app][$block])) {
+            return array();
+        }
+
         if (!isset($this->_blocks[$app][$block]['params'])) {
             $blockOb = $this->getBlock($app, $block);
             $this->_blocks[$app][$block]['params'] = $blockOb->getParams();