Compare commits

...

1 Commits

Author SHA1 Message Date
Clemens Schwaighofer
c4e2c781c6 Bug fix in arraySearchKey
Path was fully reset, reven if we went up just one level.
Now splice the reset off but keep everything before
2023-04-26 15:38:48 +09:00

View File

@@ -208,7 +208,9 @@ class ArrayHandler
$prev_depth = 0;
foreach ($recursive as $key => $value) {
if ($prev_depth > $recursive->getDepth()) {
$key_path = [];
// remove all trailing to ne depth
$diff = $prev_depth - $recursive->getDepth();
array_splice($key_path, -$diff, $diff);
}
$prev_depth = $recursive->getDepth();
if ($flat === false) {