From 5bd2b8668338272cef3616848f174ff7799782e3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 2 Dec 2021 22:18:41 +0200 Subject: [PATCH] fix broken filemanager after PM integration commit array_merge_recursive accumulates values in sub-arrays: array_merge_recursive(['nm'=>['get_rows'=>'a.c.m']], ['nm'=>['get_rows'=>'a.c.m']]) === ['nm'=>['get_rows'=>['a.c.m','a.c.m']] --- api/src/Etemplate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index 92ad59c96b..aca45ebbe6 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -119,22 +119,22 @@ class Etemplate extends Etemplate\Widget\Template { if (!empty($extra['data']) && is_array($extra['data'])) { - $content = array_merge_recursive($content, $extra['data']); + $content = self::complete_array_merge($content, $extra['data']); } if (!empty($extra['preserve']) && is_array($extra['preserve'])) { - $preserv = array_merge_recursive($preserv, $extra['preserve']); + $preserv = self::complete_array_merge($preserv, $extra['preserve']); } if (!empty($extra['readonlys']) && is_array($extra['readonlys'])) { - $readonlys = array_merge_recursive($readonlys, $extra['readonlys']); + $readonlys = self::complete_array_merge($readonlys, $extra['readonlys']); } if (!empty($extra['sel_options']) && is_array($extra['sel_options'])) { - $sel_options = array_merge_recursive($sel_options, $extra['sel_options']); + $sel_options = self::complete_array_merge($sel_options, $extra['sel_options']); } } }