Skip to content

Commit

Permalink
handle returning false from reportable callback
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 6, 2020
1 parent 8550bac commit 55f0b5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Foundation/Exceptions/ReportableHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public function __construct(callable $callback)
*/
public function __invoke(Throwable $e)
{
call_user_func($this->callback, $e);
$result = call_user_func($this->callback, $e);

if ($result === false) {
return false;
}

return ! $this->shouldStop;
}
Expand Down

0 comments on commit 55f0b5e

Please sign in to comment.