This commit is contained in:
Laurent Destailleur
2025-12-01 13:09:18 +01:00
parent ab3204a88a
commit ebacc05fe3

View File

@@ -2727,13 +2727,13 @@ class ExtraFields
/**
* Fill array_options property of object by extrafields value (using for data sent by forms)
*
* @param null $extralabels Deprecated (old $array of extrafields, now set this to null)
* @param CommonObject $object Object
* @param string $onlykey Only some keys are filled:
* 'string' => When we make update of only one extrafield ($action = 'update_extras'), calling page can set this to avoid to have other extrafields being reset.
* '@GETPOSTISSET' => When we make update of several extrafields ($action = 'update'), calling page can set this to avoid to have fields not into POST being reset.
* @param int $todefaultifmissing 1=Set value to the default value in database if value is mandatory and missing
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
* @param null $extralabels Deprecated (old $array of extrafields, now set this to null)
* @param CommonObject $object Object
* @param string $onlykey Only some keys are filled:
* 'string' => When we make update of only one extrafield ($action = 'update_extras'), calling page can set this to avoid to have other extrafields being reset.
* '@GETPOSTISSET' => When we make update of several extrafields ($action = 'update'), calling page can set this to avoid to have fields not into POST being reset.
* @param int $todefaultifmissing 1=Set value to the default value in database if value is mandatory and missing
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
*/
public function setOptionalsFromPost($extralabels, $object, $onlykey = '', $todefaultifmissing = 0)
{