diff --git a/app/lib/App/Core/AccessControl.php b/app/lib/App/Core/AccessControl.php index cb46d87..7717981 100644 --- a/app/lib/App/Core/AccessControl.php +++ b/app/lib/App/Core/AccessControl.php @@ -23,7 +23,6 @@ class AccessControl // routes that need power level 1 and up [ "routes" => [ - "race/simulator.php", "race/configure/*" ], "catcher" => [ diff --git a/app/lib/App/Core/ErrorHandler.php b/app/lib/App/Core/ErrorHandler.php index af73c6a..5000451 100644 --- a/app/lib/App/Core/ErrorHandler.php +++ b/app/lib/App/Core/ErrorHandler.php @@ -8,7 +8,7 @@ namespace App\Core; */ class ErrorHandler { - public array $error_messages; + public array $error_messages = []; public function __construct() { @@ -17,7 +17,7 @@ class ErrorHandler set_error_handler([$this, 'error']); set_exception_handler([$this, 'exception']); - $this->error_messages = []; + register_shutdown_function([$this, 'shutdown']); } public function error($errno, $errstr, $errfile, $errline): void @@ -31,7 +31,7 @@ class ErrorHandler $this->error_messages[] = "Uncaught Exception: " . $exception; } - public function __destruct() + private function shutdown(): void { if (!$this->error_messages) { return; diff --git a/app/view/pages/race/configure/teams/delete.php b/app/view/pages/race/configure/delete.php similarity index 100% rename from app/view/pages/race/configure/teams/delete.php rename to app/view/pages/race/configure/delete.php diff --git a/app/view/pages/race/configure/teams/index.php b/app/view/pages/race/configure/index.php similarity index 90% rename from app/view/pages/race/configure/teams/index.php rename to app/view/pages/race/configure/index.php index 9dd5c18..5d8ee0d 100644 --- a/app/view/pages/race/configure/teams/index.php +++ b/app/view/pages/race/configure/index.php @@ -1,6 +1,6 @@ -