Working on getting Zend_Debug::dump to output the request and exception from
the ErrorController

I get the following error twice for each call to Zend_Debug:dump()
Notice: Trying to get property of non-object in
/var/www/html/cms/application/controllers/ErrorController.php on line x

In the ErrorController
<code>
    protected $_errors = null; 

    public function errorAction() 
    {
        $this->_helper->viewRenderer->setNoRender(); // do not auto-render!
        $this->_errors = $this->_getParam('error_handler');
        switch ($this->_errors->type) { 
            case
Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: 
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
                $this->_forward('not-found');
                return; 
            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER: 
                $this->_forward('server-error'); 
                return;
        }
    }
    public function NotFoundAction() 
    { 
        
        $this->view->title = "404 Page not found";
        $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
        if (defined('APPLICATION_STATE') && APPLICATION_STATE ==
'development') {
            $this->view->content = "<h3>Error Request:</h3>\n";
            $this->view->content .=
Zend_Debug::dump($this->_errors->request, 'Errors Request', false); 
            $this->view->content .= "<h3>Exception:</h3>\n";
            $this->view->content .=
Zend_Debug::dump($this->_errors->exception, 'Errors Exception', false); 
            $this->view->content .= "DEBUG: died in " . __FUNCTION__;
        } else { 
                // Production
        }
        $this->_helper->viewRenderer->setScriptAction('404');
    } 
</code>
-- 
View this message in context: 
http://www.nabble.com/Zend_Debug%3A%3Adump-and-ErrorController-tf3985048s16154.html#a11314685
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to