From 499ab2b29b3efc0f95e915b63e2178bb277e496e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20Sch=C3=BCle?=
Date: Mon, 25 Nov 2024 11:55:02 +0100
Subject: [PATCH] fix(Tinebase/Record): prevent clearing customfields if record
has property of the same name
---
tine20/Tinebase/Record/Abstract.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tine20/Tinebase/Record/Abstract.php b/tine20/Tinebase/Record/Abstract.php
index 321b2011abb..82e53d1274a 100644
--- a/tine20/Tinebase/Record/Abstract.php
+++ b/tine20/Tinebase/Record/Abstract.php
@@ -402,7 +402,7 @@ public function setFromArray(array &$_data)
if ($this->has('customfields')) {
$application = Tinebase_Application::getInstance()->getApplicationByName($this->_application);
$customFields = Tinebase_CustomField::getInstance()->getCustomFieldsForApplication($application, get_class($this))->name;
- $recordCustomFields = array();
+ $recordCustomFields = $_data['customfields'] ?? [];
} else {
$customFields = array();
}