1 | <?php |
||
20 | final class ExceptionHandler |
||
21 | { |
||
22 | /** |
||
23 | * Enable global exception handling. |
||
24 | */ |
||
25 | public static function register() |
||
31 | |||
32 | |||
33 | /** |
||
34 | * Handle php shutdown and search for fatal errors. |
||
35 | */ |
||
36 | public static function handleShutdown() |
||
44 | |||
45 | /** |
||
46 | * Convert application error into exception. |
||
47 | * |
||
48 | * @param int $code |
||
49 | * @param string $message |
||
50 | * @param string $filename |
||
51 | * @param int $line |
||
52 | * |
||
53 | * @throws \ErrorException |
||
54 | */ |
||
55 | public static function handleError($code, $message, $filename = '', $line = 0) |
||
59 | |||
60 | /** |
||
61 | * Handle exception and output error to the user. |
||
62 | * |
||
63 | * @param \Throwable $e |
||
64 | */ |
||
65 | public static function handleException(\Throwable $e) |
||
76 | } |
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: