Skip to content

Commit e7caa09

Browse files
committed
exceute parser only on notFound&notAllowed exception
1 parent b98305d commit e7caa09

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

core/src/Core.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,15 +2693,9 @@ public function processRoutes()
26932693
->then(function ($request) {
26942694
return $this->router->dispatch($request);
26952695
});
2696-
} catch (NotFoundHttpException $exception) {
2697-
EvolutionCMS()->executeParser();
2698-
exit();
2699-
} catch (MethodNotAllowedException $exception) {
2700-
EvolutionCMS()->executeParser();
2701-
exit();
2702-
} catch (\Exception $exception) {
2703-
EvolutionCMS()->executeParser();
2704-
exit();
2696+
} catch (NotFoundHttpException | MethodNotAllowedException $exception) {
2697+
$this->executeParser();
2698+
exit;
27052699
}
27062700

27072701
$response->send();

0 commit comments

Comments
 (0)