Skip to content

Commit dc2a7c2

Browse files
committed
Merge branch 'new'
2 parents 8572d7e + 8c46959 commit dc2a7c2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/LionRoute/Route.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ private static function processInput(int $index): string {
7373

7474
private static function processOutput($response): void {
7575
echo(json_encode($response));
76+
exit();
7677
}
7778

7879
public static function dispatch(int $index): void {
@@ -83,17 +84,14 @@ public static function dispatch(int $index): void {
8384
self::processInput($index)
8485
)
8586
);
86-
exit();
8787
} catch (HttpRouteNotFoundException $e) {
8888
self::processOutput(
8989
['status' => "error", 'message' => "Path not found: {$e->getMessage()}"]
9090
);
91-
exit();
9291
} catch (HttpMethodNotAllowedException $e) {
9392
self::processOutput(
9493
['status' => "error", 'message' => "Method not allowed, {$e->getMessage()}"]
9594
);
96-
exit();
9795
}
9896
}
9997

0 commit comments

Comments
 (0)