1 | <?php |
||
17 | class ExceptionListener |
||
18 | { |
||
19 | /** |
||
20 | * @var boolean |
||
21 | */ |
||
22 | protected $stackTrace; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $default; |
||
28 | |||
29 | /** |
||
30 | * @var Kernel |
||
31 | */ |
||
32 | protected $kernel; |
||
33 | |||
34 | /** |
||
35 | * @var ExceptionManager |
||
36 | */ |
||
37 | protected $exceptionManager; |
||
38 | |||
39 | /** |
||
40 | * @var boolean |
||
41 | */ |
||
42 | protected $matchAll; |
||
43 | |||
44 | /** |
||
45 | * Constructor |
||
46 | * |
||
47 | * @param Kernel $kernel |
||
48 | * @param ExceptionManager $exceptionManager |
||
49 | * @param boolean $matchAll |
||
50 | * @param array $default |
||
51 | * @param boolean $stackTrace |
||
52 | */ |
||
53 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * Format response exception |
||
69 | * |
||
70 | * @param GetResponseForExceptionEvent $event |
||
71 | */ |
||
72 | public function onKernelException(GetResponseForExceptionEvent $event) |
||
121 | |||
122 | /** |
||
123 | * Get exception status code |
||
124 | * |
||
125 | * @param \Exception $exception |
||
126 | * |
||
127 | * @return integer |
||
128 | */ |
||
129 | private function getStatusCode(\Exception $exception) |
||
141 | |||
142 | /** |
||
143 | * Get exception message |
||
144 | * |
||
145 | * @param \Exception $exception |
||
146 | * |
||
147 | * @return integer |
||
148 | */ |
||
149 | private function getMessage(\Exception $exception) |
||
159 | |||
160 | /** |
||
161 | * Get exception headers |
||
162 | * |
||
163 | * @param \Exception $exception |
||
164 | * |
||
165 | * @return array |
||
166 | */ |
||
167 | 1 | private function getHeaders(\Exception $exception) |
|
179 | |||
180 | /** |
||
181 | * Is api exception |
||
182 | * |
||
183 | * @param \Exception $exception |
||
184 | * |
||
185 | * @return boolean |
||
186 | */ |
||
187 | private function isApiException(\Exception $exception) |
||
195 | |||
196 | /** |
||
197 | * Is flatten error exception |
||
198 | * |
||
199 | * @param \Exception $exception |
||
200 | * |
||
201 | * @return boolean |
||
202 | */ |
||
203 | private function isFlattenErrorException(\Exception $exception) |
||
211 | } |
||
212 |
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: