Bug fix in arraySearchKey path reset

This commit is contained in:
Clemens Schwaighofer
2023-04-26 15:41:56 +09:00
parent e0356dcadf
commit b01df97ffe

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) {