Fix missing error message
This commit is contained in:
parent
7de812d2ed
commit
be21405d21
@ -638,8 +638,11 @@ if (empty($reshook))
|
|||||||
$result = $object->update($socid, $user, 1, $object->oldcopy->codeclient_modifiable(), $object->oldcopy->codefournisseur_modifiable(), 'update', 0);
|
$result = $object->update($socid, $user, 1, $object->oldcopy->codeclient_modifiable(), $object->oldcopy->codefournisseur_modifiable(), 'update', 0);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$error = $object->error; $errors = $object->errors;
|
$error++;
|
||||||
|
$errors = $object->errors;
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent thirdparty's emptying if a user hasn't rights $user->rights->categorie->lire (in such a case, post of 'custcats' is not defined)
|
// Prevent thirdparty's emptying if a user hasn't rights $user->rights->categorie->lire (in such a case, post of 'custcats' is not defined)
|
||||||
if(!empty($user->rights->categorie->lire)){
|
if(!empty($user->rights->categorie->lire)){
|
||||||
// Customer categories association
|
// Customer categories association
|
||||||
@ -718,6 +721,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$object->error .= $object->db->lasterror();
|
$object->error .= $object->db->lasterror();
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user