| 1 | <?php |
||
| 10 | class WhoopsErrorHandler extends ErrorHandler |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The Whoops instance. |
||
| 14 | * |
||
| 15 | * @var \Whoops\Run |
||
| 16 | */ |
||
| 17 | protected $_whoops; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get the Whoops instance. |
||
| 21 | * |
||
| 22 | * @return \Whoops\Run The Whoops instance. |
||
| 23 | */ |
||
| 24 | public function getWhoopsInstance() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Display an error. |
||
| 35 | * |
||
| 36 | * Only when debug > 2 will a formatted error be displayed. |
||
| 37 | * |
||
| 38 | * @param array $error An array of error data. |
||
| 39 | * @param bool $debug Whether or not the app is in debug mode. |
||
| 40 | * |
||
| 41 | * @return void |
||
| 42 | */ |
||
| 43 | protected function _displayError($error, $debug) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Displays an exception response body. |
||
| 56 | * |
||
| 57 | * @param \Exception $exception The exception to display |
||
| 58 | * |
||
| 59 | * @return void |
||
| 60 | */ |
||
| 61 | protected function _displayException($exception) |
||
| 71 | } |
||
| 72 |
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: