From 9c1dd164a13a84181717ed2d552cb16c4fb8403b Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 23 Oct 2023 14:18:12 -0600 Subject: [PATCH] Api: Avoid overwriting field settings if they were set via setElementAttribute --- api/src/Etemplate/Widget/Customfields.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Customfields.php b/api/src/Etemplate/Widget/Customfields.php index 1d9fefc56d..1ead3cb46a 100644 --- a/api/src/Etemplate/Widget/Customfields.php +++ b/api/src/Etemplate/Widget/Customfields.php @@ -273,7 +273,10 @@ class Customfields extends Transformer // Re-format date custom fields from Y-m-d $field_settings =& self::get_array(self::$request->modifications, "{$this->id}[customfields]",true); - if (true) $field_settings = array(); + if(!is_array($field_settings)) + { + $field_settings = array(); + } $link_types = Api\Link::app_list(); foreach($fields as $fname => $field) {