From c1dfa685ec0beb34cc9dc59b7ee50e0d29f2b372 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2021 12:47:05 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: array_merge(): Argument #2 must be of type array, null given --- api/src/Etemplate/Widget/Customfields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Customfields.php b/api/src/Etemplate/Widget/Customfields.php index 466ff5f5bc..51c975e7a0 100644 --- a/api/src/Etemplate/Widget/Customfields.php +++ b/api/src/Etemplate/Widget/Customfields.php @@ -405,7 +405,7 @@ class Customfields extends Transformer $all_readonly = $this->is_readonly($cname, $form_name); $value_in = self::get_array($content, $form_name); // if we have no id / use self::GLOBAL_ID, we have to set $value_in in global namespace for regular widgets validation to find - if (!$this->id) $content = array_merge($content, $value_in); + if (!$this->id) $content = array_merge($content, (array)$value_in); //error_log(__METHOD__."($cname, ...) form_name=$form_name, use-private={$this->attrs['use-private']}, value_in=".array2string($value_in)); if($this->getElementAttribute($form_name, 'customfields')) {