Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Allow strings to be passed to the report function #35803

Merged
merged 1 commit into from Jan 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Illuminate/Foundation/helpers.php
Expand Up @@ -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);
}
}
Expand Down