From 29048a720304212615c4c60afa13ec0ed9caf55a Mon Sep 17 00:00:00 2001 From: "origami11@yandex.ru" Date: Fri, 30 Jan 2026 12:55:58 +0300 Subject: [PATCH] fix: TableTree --- src/TableTree.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TableTree.php b/src/TableTree.php index d09eac3..02d0555 100644 --- a/src/TableTree.php +++ b/src/TableTree.php @@ -30,8 +30,9 @@ class TableTree { $keys = Functions::key_unique_values($name, $table); $data = []; foreach ($keys as $index) { - list($rows, $table) = Functions::partition (Functions::lcurry(['\ctiso\Functions', '__index'], $index, $name), $table); - // $rows = array_filter ($table, lcurry('__index', intval($index), $name)); + list($rows, $table) = Functions::partition(fn($row) => $row[$name] == $index, $table); + // list($rows, $table) = Functions::partition (Functions::lcurry(['\ctiso\Functions', '__index'], $index, $name), $table); + // $rows = array_filter ($table, lcurry('__index', intval($index), $name)); //$rows = array_filter ($table, create_function ('$x', 'return __index ('.intval($index).', \''.$name.'\', $x);')); $data[$index] = call_user_func ($fn, $name, $index, $rows, self::walk ($level, $rows, $fn)); }