From d16f8b68db7214611de2af081dcf47ebd8433fe4 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Mon, 1 Dec 2025 11:14:16 +0100 Subject: [PATCH] FIX not remove value of others extra-fields on update extras action --- htdocs/core/actions_addupdatedelete.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 25458a612e5..63029dbdb83 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -351,9 +351,11 @@ if (preg_match('/^set(\w+)$/', $action, $reg) && GETPOST('id', 'int') > 0 && !em if ($action == "update_extras" && GETPOST('id', 'int') > 0 && !empty($permissiontoadd)) { $object->fetch(GETPOST('id', 'int')); + $attribute = GETPOST('attribute', 'aZ09'); + $error = 0; - $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); + $ret = $extrafields->setOptionalsFromPost(null, $object, $attribute); if ($ret < 0) { $error++; setEventMessages($extrafields->error, $object->errors, 'errors');