You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a single route match, calling skipRemaining() or skipThis() within the respond() call causes an HttpException and onHttpError gets called. This is because the $matched->add($route) (line 596) in klein.php does not execute in those cases.
I solved it by moving that block before calling handleRouteCallback(), but I'm not sure if there are other side effects. So far none that I can detect.
try {
if ($path !== '*' && $count_match) { // this is far more clear than:
$matched->add($route); // $count_match && $matched->add($route);
}
$this->handleRouteCallback($route, $matched, $methods_matched);
} catch (DispatchHaltedException $e) {
...
}
The continue 2; and break 2; statements cause the skipping of the code block.
The text was updated successfully, but these errors were encountered:
@tikoflano I've used $klein->abort(200) and it still seems to successfully stop processing further routes while also sending the response code specified. This is my first time using Klein so I'm not sure if using abort is going have some strange side effect I'll regret later.
If there is a single route match, calling
skipRemaining()
orskipThis()
within therespond()
call causes an HttpException and onHttpError gets called. This is because the$matched->add($route)
(line 596) in klein.php does not execute in those cases.I solved it by moving that block before calling
handleRouteCallback()
, but I'm not sure if there are other side effects. So far none that I can detect.The
continue 2;
andbreak 2;
statements cause the skipping of the code block.The text was updated successfully, but these errors were encountered: