FIX: Errors Handling for CreateFrom Hooks

This commit is contained in:
Noé Courtier
2023-01-18 09:44:23 +01:00
parent 597dfc04b7
commit d344e108c9
14 changed files with 27 additions and 0 deletions

View File

@@ -1252,6 +1252,8 @@ class Commande extends CommonOrder
$action = '';
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
$this->errors += $hookmanager->errors;
$this->error = $hookmanager->error;
$error++;
}
}
@@ -1406,6 +1408,8 @@ class Commande extends CommonOrder
$action = '';
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
$this->errors += $hookmanager->errors;
$this->error = $hookmanager->error;
$error++;
}