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

Fix. when add router to stacks in wrong in_array arguments #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix. when add router to stacks in wrong in_array arguments #4

wants to merge 1 commit into from

Conversation

Lupino
Copy link
Contributor

@Lupino Lupino commented Apr 8, 2014

No description provided.

@hfcorriez
Copy link
Member

这里有一个问题需要考虑,通过配置放进去的 中间件 和通过 add 添加的会结构不同,在考虑把结构做一致。这个先放到这里。

@hfcorriez hfcorriez added the bug label Apr 11, 2014
@Lupino
Copy link
Contributor Author

Lupino commented Apr 13, 2014

$app->add(function($req, $res, $next) {
    $next();
});

加这个路由是会是所有的 router 实效,原因是没有把 $app->router 加到 stacks 上,如果能够确定 router 没有在 stacks 上,可以直接 append 上去,不需要那部分判断了。

@hfcorriez
Copy link
Member

不会啊,我刚测试了下,没有问题。你是最新版么,这段判断是基于最终的数据结构来生成的。

只有没检测到 router 才会添加到最后。

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

Successfully merging this pull request may close these issues.

2 participants