Zend Framework

Error in Zend_View_Script example about Smarty

Details

  • Type: Docs:  Problem Docs: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: Zend_View
  • Labels:
    None
  • Language:
    English

Description

There is a bug in the example script in http://framework.zend.com/manual/en/zend.view.scripts.html
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.

Issue Links

Activity

Hide
Matthew Weier O'Phinney added a comment -

Fixed in trunk and 1.9 release branch.

Show
Matthew Weier O'Phinney added a comment - Fixed in trunk and 1.9 release branch.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: