-
Notifications
You must be signed in to change notification settings - Fork 139
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
Slim Error on redirecting from error callback #46
Comments
Slim 2 uses exceptions internally for control flow. You are seeing one of these Slim 2 control flow exceptions. Look for differences in your development and production config. |
Honestly thats not realy any difference except the DB Connect credentials. |
It is Slim which throws the exception, not the middleware. https://github.com/slimphp/Slim/blob/2.x/Slim/Slim.php#L1102-L1105 Why the Exception is ignored on development host and shown on live host I do not know. However quick Google search reveals this. http://stackoverflow.com/questions/25902650/slim-redirect-works-but-also-throws-an-exception |
Thanks. I packed it now that way and it works :/ But it feels wrong. try {
return $app->redirect( $app->urlFor('index') );
} catch(\Exception $e) {} |
Yeah I agree. I think that was the reason those Exceptions were dropped in 3.x. |
I have a strange issue. Thats the error callback of the JWT JwtAuthentication (1.x).
On my development system (mamp php 5.6) the rediect from the "error" callback works fine.
On my productions erver (1&1 php 5.6) I get the following error:
What could be wrong?!
The text was updated successfully, but these errors were encountered: