Skip to content

Commit 57a26a0

Browse files
committed
Fix #459
1 parent c6d216c commit 57a26a0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public static function fromString(ReflectedTable $table, String $value): Conditi
3333
if (count($parts) < 2) {
3434
return null;
3535
}
36+
if (count($parts) < 3) {
37+
$parts[2] = '';
38+
}
3639
$field = $table->getColumn($parts[0]);
3740
$command = $parts[1];
3841
$negate = false;

tests/functional/001_records/055_filter_category_on_null_icon.log

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ Content-Type: application/json
55
Content-Length: 94
66

77
{"records":[{"id":1,"name":"announcement","icon":null},{"id":2,"name":"article","icon":null}]}
8+
===
9+
GET /records/categories?filter=icon,is
10+
===
11+
200
12+
Content-Type: application/json
13+
Content-Length: 94
14+
15+
{"records":[{"id":1,"name":"announcement","icon":null},{"id":2,"name":"article","icon":null}]}

0 commit comments

Comments
 (0)