Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QController_Abstract::execute() 没有找到动作方法时应该抛出异常 #21

Closed
GoogleCodeExporter opened this issue Apr 15, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

{{{
    function execute($action_name, $namespace = null, $module = null)
    {
        $action_method = 'action' . ucfirst(strtolower($action_name));
        $action_method = str_replace('_', '', $action_method);
        if (method_exists($this, $action_method)) {
            $this->beforeExecute($action_name, $namespace, $module);
            $ret = $this->{$action_method}();
            return $this->afterExecute($action_name, $ret, $namespace,
$module);
        } else {
            $arr = array($this->request->controller_name, $action_name,
$namespace, $module);
            $this->view = null;
            return
call_user_func_array(Q::getIni('dispatcher_on_action_not_found'), $arr);
        }
    }
}}}

其中的:

{{{
call_user_func_array(Q::getIni('dispatcher_on_action_not_found'), $arr);
}}}

应该改为抛出异常。

Original issue reported on code.google.com by dualf...@gmail.com on 11 Apr 2008 at 5:05

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Original comment by dualf...@gmail.com on 19 Apr 2008 at 8:31

  • Added labels: Component-Core, Milestone-2.0

@GoogleCodeExporter
Copy link
Author

这个 issue 已经不适应 2.1 的结构

Original comment by dualf...@gmail.com on 23 Jan 2009 at 6:20

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant