OK, that is the solution, do not call it statically:
                $broker = new Zend_Controller_Action_HelperBroker($this->_actionController);
                $broker->getHelper('redirector')->goto('index');
Bart

Bart McLeod schreef:
Hi All,

I want to use the redirector helper from within another action helper and I call:
Zend_Controller_Action_HelperBroker::getHelper('redirector')->goto('index');

This yields an error:
Fatal error: Cannot access protected property Shop_Action_Helper_InitShop::$_actionController in D:\ZendFramework\library\Zend\Controller\Action\HelperBroker.php on line 305

Should I use magic __get to return $this->_actionController, or is this a bug and should the helper broker call $this->getActionController for example?

Or should I not call this static function from within an action helper?

It also happens if I use this static call from within an action controller, but there I circumvented the error by:
public $_actionController;//bug workaround
in my action controller, but this is a hack of course.

Or should I not be calling it statically at all? I think I saw an example somewhere that demonstrated static usage.

Bart


Reply via email to