Skip to content

Commit 0ee6edb

Browse files
committed
fix for #701
1 parent 282daac commit 0ee6edb

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

api.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9942,11 +9942,8 @@ private function getConditionsAsPathTree(ReflectedTable $table, array $params):
99429942
$conditions = new PathTree();
99439943
foreach ($params as $key => $filters) {
99449944
if (substr($key, 0, 6) == 'filter') {
9945-
$path = [];
9946-
$suffix = substr($key, 6);
9947-
if ($suffix) {
9948-
$path = str_split($suffix);
9949-
}
9945+
preg_match_all('/\d+|\D+/', substr($key, 6), $matches);
9946+
$path = $matches[0];
99509947
foreach ($filters as $filter) {
99519948
$condition = Condition::fromString($table, $filter);
99529949
if (($condition instanceof NoCondition) == false) {

src/Tqdev/PhpCrudApi/Record/FilterInfo.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ private function getConditionsAsPathTree(ReflectedTable $table, array $params):
1515
$conditions = new PathTree();
1616
foreach ($params as $key => $filters) {
1717
if (substr($key, 0, 6) == 'filter') {
18-
$path = [];
19-
$suffix = substr($key, 6);
20-
if ($suffix) {
21-
$path = str_split($suffix);
22-
}
18+
preg_match_all('/\d+|\D+/', substr($key, 6), $matches);
19+
$path = $matches[0];
2320
foreach ($filters as $filter) {
2421
$condition = Condition::fromString($table, $filter);
2522
if (($condition instanceof NoCondition) == false) {

0 commit comments

Comments
 (0)