Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-03-20 17:16:05 +01:00
commit 6b000698e0

View file

@ -791,9 +791,10 @@ abstract class CommonInvoice extends CommonObject
if (!empty($hookmanager->resArray['result'])) {
$this->error = $hookmanager->resArray['error'];
if (!empty($hookmanager->resArray['errors'])) {
$this->errors = array_merge($this->errors, array($this->error), $hookmanager->resArray['errors']);
} else {
$this->errors = array_merge($this->errors, array($this->error));
$this->errors = array_merge($this->errors, $hookmanager->resArray['errors']);
}
if (!in_array($this->error, $this->errors)) {
$this->errors[] = $this->error;
}
return $hookmanager->resArray['result'];
}
@ -846,15 +847,15 @@ abstract class CommonInvoice extends CommonObject
}
$parameters = array();
$reshook = $hookmanager->executeHooks('isEditable', $parameters, $this, $action);
$reshook = $hookmanager->executeHooks('isReplacable', $parameters, $this, $action);
if (!empty($hookmanager->resArray['result'])) {
$this->error = $hookmanager->resArray['error'];
if (!in_array($this->error, $this->errors)) {
$this->errors[] = $this->error;
}
if (!empty($hookmanager->resArray['errors'])) {
$this->errors = array_merge($this->errors, $hookmanager->resArray['errors']);
}
if (!in_array($this->error, $this->errors)) {
$this->errors[] = $this->error;
}
return $hookmanager->resArray['result'];
}
@ -959,12 +960,12 @@ abstract class CommonInvoice extends CommonObject
$reshook = $hookmanager->executeHooks('isErasable', $parameters, $this, $action);
if (!empty($hookmanager->resArray['result'])) {
$this->error = $hookmanager->resArray['error'];
if (!in_array($this->error, $this->errors)) {
$this->errors[] = $this->error;
}
if (!empty($hookmanager->resArray['errors'])) {
$this->errors = array_merge($this->errors, $hookmanager->resArray['errors']);
}
if (!in_array($this->error, $this->errors)) {
$this->errors[] = $this->error;
}
return $hookmanager->resArray['result'];
}
}