Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | public function testEmpty() |
||
25 | { |
||
26 | $filter = new DateTimeRangeFilter(); |
||
27 | $filter->initialize('field_name', ['field_options' => ['class' => 'FooBar']]); |
||
28 | |||
29 | $builder = new ProxyQuery(new QueryBuilder()); |
||
|
|||
30 | |||
31 | $filter->filter($builder, 'alias', 'field', null); |
||
32 | $filter->filter($builder, 'alias', 'field', ''); |
||
33 | |||
34 | $this->assertEquals([], $builder->query); |
||
35 | $this->assertFalse($filter->isActive()); |
||
36 | } |
||
37 | |||
43 |
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: