summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2023-07-18 13:53:14 +0100
committerGreg Roach <greg@subaqua.co.uk>2023-07-18 13:53:14 +0100
commitd5a67ecc93b0e0a2a173314356281c2abacf8f4b (patch)
tree05fe4cb2e9f1d989c80e3a3a28bb2b85e51076a9
parent3f6109dd0c627b81fe9b9aaf96cb97daa8474017 (diff)
downloadwebtrees-d5a67ecc93b0e0a2a173314356281c2abacf8f4b.tar.gz
webtrees-d5a67ecc93b0e0a2a173314356281c2abacf8f4b.tar.bz2
webtrees-d5a67ecc93b0e0a2a173314356281c2abacf8f4b.zip
Show line breaks in stack-traces
-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);
}
}