1 | <?php |
||
15 | class Handler extends ExceptionHandler |
||
16 | { |
||
17 | /** |
||
18 | * A list of the exception types that should not be reported. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $dontReport = [ |
||
23 | AuthorizationException::class, |
||
24 | HttpException::class, |
||
25 | ModelNotFoundException::class, |
||
26 | ValidationException::class, |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * A list of the inputs that are never flashed for validation exceptions. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $dontFlash = [ |
||
35 | 'password', |
||
36 | 'password_confirmation', |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * Report or log an exception. |
||
41 | * |
||
42 | * @param \Exception $exception |
||
43 | * @return void |
||
44 | */ |
||
45 | public function report(Exception $exception) |
||
49 | |||
50 | /** |
||
51 | * Render an exception into an HTTP response. |
||
52 | * |
||
53 | * @param \Illuminate\Http\Request $request |
||
54 | * @param \Exception $e |
||
55 | * |
||
56 | * @return \Symfony\Component\HttpFoundation\Response |
||
57 | */ |
||
58 | public function render($request, Exception $e) |
||
75 | |||
76 | /** |
||
77 | * Convert an authentication exception into an unauthenticated response. |
||
78 | * |
||
79 | * @param \Illuminate\Http\Request $request |
||
80 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
81 | * @return \Illuminate\Http\Response |
||
82 | */ |
||
83 | protected function unauthenticated($request, AuthenticationException $exception) |
||
91 | } |
||
92 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: