ZF-2758: fatal error: Zend_Controller_Action_Helper_ContextSwitch depends on Zend_Layout but doesn't include it
Description
The following code:
class IndexController extends Zend_Controller_Action {
public function init() {
$contextSwitch = $this->_helper->getHelper('contextSwitch');
$contextSwitch->addActionContext('index', 'json')->initContext('json');
}
public function indexAction() {
$this->view->foo = 'bar';
}
}
produces the following fatal error if 'Zend_Layout' isn't included in the project: Fatal error: Class 'Zend_Layout' not found in /usr/share/php/Zend/Controller/Action/Helper/ContextSwitch.php on line 252
Comments
Posted by Cole Snodgrass (cole.snodgrass) on 2008-02-28T16:57:30.000+0000
simple patch
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T09:35:18.000+0000
Scheduling for 1.5.0RC2.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T11:23:38.000+0000
Committed to trunk and merged to release branch.