Thanks again. I would have thought they would be the same, given that a
404 is an exception response, and that a bad action actually produces an
exception code of 404.
On 25/11/2010 16:41, Hector Virgen wrote:
The code in the first var_dump is the exception code, which defaults
to zero. I don't think ZF uses exception codes but I could be wrong.
On the second var_dump(), that's a response object which was updated
to respond with a 404.
I hope this helps!
--
Hector Virgen
Sent from my Droid X
On Nov 25, 2010 7:56 AM, "Mike A" <[email protected]
<mailto:[email protected]>> wrote:
> With a bad controller http://domain/default/sfsdf:
>
> I var_dump($errors) after the first line of class ErrorController
> <$errors = $this->_getParam('error_handler')>, and get (edited)...
>
> *object*(/ArrayObject/)[/32/]
> /public/ 'exception'=>
> *object*(/Zend_Controller_Dispatcher_Exception/)[/31/]
> /protected/ 'message'=> string 'Invalid controller specified
(sfsdf)' /(length=36)/
> /protected/ 'code'=> int 0
>
> I var_dump($this->getFrontController()) and get (edited)...
>
> *object*(/Zend_Controller_Front/)[/7/]
> /protected/ '_dispatcher'=>
> *object*(/Zend_Controller_Dispatcher_Standard/)[/4/]
> /protected/ '_response'=>
> *object*(/Zend_Controller_Response_Http/)[/28/]
> /protected/ '_httpResponseCode'=> int 404
> /protected/ '_plugins'=>
> *object*(/Zend_Controller_Plugin_Broker/)[/8/]
> /protected/ '_response'=>
> *object*(/Zend_Controller_Response_Http/)[/28/]
> /protected/ '_httpResponseCode'=> int 404
> /protected/ '_request'=>
> *object*(/Zend_Controller_Request_Http/)[/27/]
> /protected/ '_response'=>
> *object*(/Zend_Controller_Response_Http/)[/28/]
> /protected/ '_httpResponseCode'=> int 404
>
> Why does "code" in the first dump not match the (correct)
> httpResponseCode in the second? It does if I have a good controller and
> a bad action.
>
> TIA...
>
>