ZF-8254: Error in Zend_View_Script example about Smarty
Description
There is a bug in the example script in http://framework.zend.com/manual/en/… about how to instanciate Zend_View_Smarty class. Code error:
//Example 1. In initView() of initializer.
$view = new Zend_View_Smarty('/path/to/templates');
$viewRenderer =
new Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
viewRender line must be
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
because the static method getStaticHelper() is not a constructor.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2009-11-11T05:52:55.000+0000
Fixed in trunk and 1.9 release branch.