mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX: Errors Handling for CreateFrom Hooks
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user