mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09:21 +02:00
Fix: display 404 error instead of 500 when page has been removed from filesystem
This commit is contained in:
parent
8cf3409077
commit
c2bf94fb23
@ -108,6 +108,10 @@ $dispatcher = FastRoute\cachedDispatcher(function (FastRoute\RouteCollector $r)
|
||||
|
||||
foreach ($routes as $route) {
|
||||
if (!str_contains($route[2], '__redirect__') && !str_contains($route[2], '__database__')) {
|
||||
if (!is_file(BASE . 'system/pages/' . $route[2])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$routesFinal[] = [$route[0], $route[1], 'system/pages/' . $route[2], $route[3] ?? 10000];
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user