Skip to content

Commit 284220a

Browse files
committed
Fixes #502
1 parent 1889a1e commit 284220a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Tqdev/PhpCrudApi/Record/Condition/Condition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function fromString(ReflectedTable $table, String $value): Conditi
3131
$condition = new NoCondition();
3232
$parts = explode(',', $value, 3);
3333
if (count($parts) < 2) {
34-
return null;
34+
return $condition;
3535
}
3636
if (count($parts) < 3) {
3737
$parts[2] = '';

src/Tqdev/PhpCrudApi/Record/FilterInfo.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22
namespace Tqdev\PhpCrudApi\Record;
33

4+
use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
45
use Tqdev\PhpCrudApi\Record\Condition\AndCondition;
56
use Tqdev\PhpCrudApi\Record\Condition\Condition;
7+
use Tqdev\PhpCrudApi\Record\Condition\NoCondition;
68
use Tqdev\PhpCrudApi\Record\Condition\OrCondition;
7-
use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
89

910
class FilterInfo
1011
{
@@ -15,7 +16,7 @@ private function addConditionFromFilterPath(PathTree $conditions, array $path, R
1516
if (isset($params[$key])) {
1617
foreach ($params[$key] as $filter) {
1718
$condition = Condition::fromString($table, $filter);
18-
if ($condition != null) {
19+
if (($condition instanceof NoCondition) == false) {
1920
$conditions->put($path, $condition);
2021
}
2122
}

0 commit comments

Comments
 (0)