From cb8c6d71bcace83711f1f17e093f2679c3a040ce Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 29 Nov 2017 16:10:22 +1030 Subject: [PATCH] Fix admin error handling --- framework/core/src/Admin/Server.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/framework/core/src/Admin/Server.php b/framework/core/src/Admin/Server.php index 43aa38116..00b3e686e 100644 --- a/framework/core/src/Admin/Server.php +++ b/framework/core/src/Admin/Server.php @@ -29,11 +29,8 @@ class Server extends AbstractServer if ($app->isInstalled()) { $path = parse_url($app->url('admin'), PHP_URL_PATH); - $errorDir = __DIR__.'/../../error'; - // All requests should first be piped through our global error handler - $debugMode = ! $app->isUpToDate() || $app->inDebugMode(); - $pipe->pipe($path, new HandleErrors($errorDir, $app->make('log'), $debugMode)); + $pipe->pipe($path, $app->make('Flarum\Http\Middleware\HandleErrors', ['debug' => $app->inDebugMode() || ! $app->isUpToDate()])); if ($app->isUpToDate()) { $pipe->pipe($path, $app->make('Flarum\Http\Middleware\ParseJsonBody'));