From c4e2c781c63537e10ed3d8449deea41bd3a8c7d2 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 26 Apr 2023 15:38:48 +0900 Subject: [PATCH] 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 --- www/lib/CoreLibs/Combined/ArrayHandler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/lib/CoreLibs/Combined/ArrayHandler.php b/www/lib/CoreLibs/Combined/ArrayHandler.php index 8619f348..a7cb5f1f 100644 --- a/www/lib/CoreLibs/Combined/ArrayHandler.php +++ b/www/lib/CoreLibs/Combined/ArrayHandler.php @@ -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) {