setErrors does not exists, same solution as dolibarr v19.0 (#36107)

* setErrors does not exists, same solution as dolibarr v19.0

* reload ci

* reload ci 2

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
This commit is contained in:
Eric - CAP-REL
2025-11-20 23:58:15 +01:00
committed by GitHub
parent f32386208d
commit c8acd48e34

View File

@@ -80,6 +80,10 @@ class FormSetup
*/
public $formHiddenInputs = array();
/**
* @var string[] $errors
*/
public $errors = array();
/**
* Constructor
@@ -253,10 +257,9 @@ class FormSetup
$parameters = array();
$reshook = $hookmanager->executeHooks('formSetupBeforeSaveConfFromPost', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
$this->setErrors($hookmanager->errors);
$this->errors = $hookmanager->errors;
return -1;
}
if ($reshook > 0) {
return $reshook;
}