Closed X-Tender closed 7 years ago
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. So I sould better bother the slim developer about the issue :) ?!
It is Slim which throws the exception, not the middleware.
https://github.com/slimphp/Slim/blob/2.x/Slim/Slim.php#L1102-L1105 https://github.com/slimphp/Slim/blob/2.x/Slim/Slim.php#L1037-L1043 https://github.com/slimphp/Slim/blob/2.x/Slim/Slim.php#L1020-L1023
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?!