From 101121830deaf4a8f1ff7e03b8dcbe56f15be2a9 Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Wed, 6 Jan 2021 20:19:55 +0100 Subject: [PATCH] wip (#35803) --- src/Illuminate/Foundation/helpers.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index d6af860d8915..2c1540f18e37 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -586,11 +586,15 @@ function redirect($to = null, $status = 302, $headers = [], $secure = null) /** * Report an exception. * - * @param \Throwable $exception + * @param \Throwable|string $exception * @return void */ - function report(Throwable $exception) + function report($exception) { + if (is_string($exception)) { + $exception = new Exception($exception); + } + app(ExceptionHandler::class)->report($exception); } }