ZF-5891: Allow setting layout without enabling it

Description

Index: Layout.php

--- Layout.php (revision 14171) +++ Layout.php (working copy) @@ -320,15 +320,18 @@ /** * Set layout script to use * - * Note: enables layout. + * Note: by default enables layout. * - * @param string $name + * @param string $name + * @param string $enable
* @return Zend_Layout */ - public function setLayout($name) + public function setLayout($name, $enable = true) { $this->_layout = (string) $name; - $this->enableLayout(); + if ($enable) { + $this->enableLayout(); + } return $this; }

Comments

fixed in r19088