-- Philip G <[EMAIL PROTECTED]> wrote (on Monday, 15 January 2007, 07:02 PM -0600): > On 1/15/07, Kelsey Sigurdur <[EMAIL PROTECTED]> wrote: > > Within a controller you can use > > > > $this-> getRequest()-> getControllerName(); > > > > and > > > > $this-> getRequest()-> getActionName(); > > > > Tried that, it's empty: > Fatal error: Call to a member function getControllerName() on a > non-object in > /media/EXTERNAL/websites/dev/gpcentre.net/zend/GP/Controller/Action.php > on line 133 > > Line 133: > return $this-> getRequest()-> getControllerName();
I'm guessing that you overrode __construct() in your base action class. Rename __construct() to init(), or, alternatively, change your constructor slightly to match the current Zend_Controller_Action constructor signature: public function __construct( Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs) { parent::__construct($request, $response, $invokeArgs); // continue initializations... } Probably the better way is to simply rename your constructor, though. This is all documented here: http://framework.zend.com/manual/en/zend.controller.migration.html#zend.controller.migration.fromzerotwo -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/