ZF-8763: Zend_Controller_Dispatcher_Standard rethrows Zend_Controller_Action_Exception as Zend_Controller_Exception


Zend_Controller_Dispatcher_Standard::dispatch() in try { $controller->dispatch($action); } catch (Exception $e) { catches Zend_Controller_Action_Exception thrown from controller on missing action method and rethrows it wrapped in Zend_Controller_Action_Exception.

On the other hand Zend_Controller_Plugin_ErrorHandler::postDispatch() checks for Zend_Controller_Action_Exception to set $error->type = self::EXCEPTION_NO_ACTION; which is then used by custom ErrorControler to determine what to do with an error. Without type set as EXCEPTION_NO_ACTION it does not handle missing action as a missing "page".

I think Zend_Controller_Dispatcher_Standard::dispatch() should just "throw $e" instead of "hrow new Zend_Controller_Exception(....)".


Please check if it still occurs on trunk. I ink it was fixed there already.

The version I'm reporting this bug against is:

$ LANG=POSIX svn info library/Zend/Controller/Dispatcher/Standard.php Path: library/Zend/Controller/Dispatcher/Standard.php Name: Standard.php URL: http://framework.zend.com/svn/framework/… Repository Root: http://framework.zend.com/svn/framework Repository UUID: 44c647ce-9c0f-0410-b52a-842ac1e357ba Revision: 20167 Node Kind: file Schedule: normal Last Changed Author: bkarwin Last Changed Rev: 20096 Last Changed Date: 2010-01-06 03:05:09 +0100 (Wed, 06 Jan 2010) Text Last Updated: 2010-01-09 22:54:38 +0100 (Sat, 09 Jan 2010) Checksum: 8d4d3d09592cf9ec87ef8a7bf02587d1

It's a latest one as of this writing.

Fixed in r20244 in trunk