summaryrefslogtreecommitdiff
path: root/app/Http/Middleware/HandleExceptions.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http/Middleware/HandleExceptions.php')
-rw-r--r--app/Http/Middleware/HandleExceptions.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Http/Middleware/HandleExceptions.php b/app/Http/Middleware/HandleExceptions.php
index 52df9dfb4d..20e338c6ad 100644
--- a/app/Http/Middleware/HandleExceptions.php
+++ b/app/Http/Middleware/HandleExceptions.php
@@ -38,6 +38,7 @@ use Throwable;
use function dirname;
use function error_get_last;
use function ini_get;
+use function nl2br;
use function ob_end_clean;
use function ob_get_level;
use function register_shutdown_function;
@@ -140,7 +141,7 @@ class HandleExceptions implements MiddlewareInterface, StatusCodeInterface
}
// Show a stack dump.
- return response((string) $exception, StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR);
+ return response(nl2br((string) $exception), StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR);
}
}