ZF-2560: Zend_Controller_Action::__call() should throw different exceptions for missing actions vs missing methods

Description

Zend_Controller_Action::__call() currently doesn't differentiate between missing actions and missing methods, which can lead to false 404 errors in the ErrorController.

Consider implementing:


public function __call($method, $args)
{
    if ('Action' == substr($method, -6)) {
        throw new Zend_Controller_Action('Action does not exist', 404);
    }
    throw new Zend_Controller_Action('Method does not exist', 500);
}

Error controllers could then test for the error code and/or message in order to determine the error type.

Comments

Committed to trunk in r7783, and backported to 1.0 branch in r7784.