From ac29815974f9749204a1a39efd020b80e473fffd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 25 Jun 2025 12:58:37 +0200 Subject: [PATCH] replace array_merge by '+' when combining returned array of hooks --- inc/inc.ClassControllerCommon.php | 2 +- inc/inc.ClassViewCommon.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index 0203d9b48..ea7b958a9 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -285,7 +285,7 @@ class SeedDMS_Controller_Common { if(is_string($tmpret)) { $ret = ($ret === null) ? $tmpret : (is_string($ret) ? $ret.$tmpret : array_merge($ret, array($tmpret))); } elseif(is_array($tmpret)) { // || is_object($tmpret)) { - $ret = ($ret === null) ? $tmpret : (is_string($ret) ? array_merge(array($ret), $tmpret) : array_merge($ret, $tmpret)); + $ret = ($ret === null) ? $tmpret : (is_string($ret) ? (array($ret) + $tmpret) : ($ret + $tmpret)); } else $ret = $tmpret; } diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index b63b2ef2e..b7557f5f5 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -213,7 +213,7 @@ class SeedDMS_View_Common { if(is_string($tmpret)) { $ret = ($ret === null) ? $tmpret : (is_string($ret) ? $ret.$tmpret : array_merge($ret, array($tmpret))); } elseif(is_array($tmpret) || is_object($tmpret)) { - $ret = ($ret === null) ? $tmpret : (is_string($ret) ? array_merge(array($ret), $tmpret) : array_merge($ret, $tmpret)); + $ret = ($ret === null) ? $tmpret : (is_string($ret) ? (array($ret) + $tmpret) : ($ret + $tmpret)); } else $ret = $tmpret; }