1 | <?php |
||
12 | class InvalidArgumentException extends CacheException |
||
13 | { |
||
14 | const CODE = 1003; |
||
15 | |||
16 | /** |
||
17 | * CacheException constructor. |
||
18 | * |
||
19 | * @param string $argument |
||
20 | * @param string $expected |
||
21 | * @param string $value |
||
22 | * @param Exception|null $previous |
||
23 | */ |
||
24 | public function __construct($argument, $expected, $value, Exception $previous = null) |
||
32 | } |
||
33 |
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: