From d95f6e88f015a4e273ec8db7eca524f8b76f00f0 Mon Sep 17 00:00:00 2001 From: Rom1-B Date: Mon, 25 Sep 2023 12:17:38 +0200 Subject: [PATCH] fix: empty multiple-value field --- inc/container.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/container.class.php b/inc/container.class.php index 3e271b33..11e55ba0 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -1168,6 +1168,8 @@ public function updateFieldsValues($data, $itemtype, $massiveaction = false) } if (array_key_exists($field_name, $data)) { $data[$field_name] = json_encode($data[$field_name]); + } elseif (array_key_exists('_' . $field_name . '_defined', $data)) { + $data[$field_name] = json_encode([]); } }