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

Filters wrap in the wrong order #15

Open
peterhorne opened this issue May 30, 2012 · 1 comment
Open

Filters wrap in the wrong order #15

peterhorne opened this issue May 30, 2012 · 1 comment

Comments

@peterhorne
Copy link
Owner

<?php

$app->filter(function($route) {
    echo 'Called first';
    return $route();
});

$app->filter(function($route) {
    echo 'Called second';
    return $route();
});


$app->get('/', function() {
    return 'I am the route';
});

Output should be:

Called first
Called second
I am the route

Actual output is:

Called second
Called first
I am the route
@peterhorne
Copy link
Owner Author

Reopened because unit test have not been written yet

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