FIX error report not returned
This commit is contained in:
parent
c313ad6195
commit
ebe30f7a0e
@ -319,6 +319,7 @@ class Mailing extends CommonObject
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$object->error;
|
||||
$this->errors=array_merge($this->errors, $object->errors);
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
@ -1285,7 +1285,12 @@ class Propal extends CommonObject
|
||||
// Create clone
|
||||
$object->context['createfromclone']='createfromclone';
|
||||
$result=$object->create($user);
|
||||
if ($result < 0) $error++;
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error = $object->error;
|
||||
$this->errors = array_merge($this->errors, $object->errors);
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -4951,7 +4951,7 @@ abstract class CommonObject
|
||||
if ($this->array_options[$key] === '') $mandatorypb=true;
|
||||
if ($mandatorypb)
|
||||
{
|
||||
dol_syslog($this->error);
|
||||
dol_syslog("Mandatory extra field ".$key." is empty");
|
||||
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -356,6 +356,7 @@ class Productbatch extends CommonObject
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$object->error;
|
||||
$this->errors=array_merge($this->errors, $object->errors);
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
@ -924,7 +924,8 @@ class Productcustomerprice extends CommonObject
|
||||
// Other options
|
||||
if ($result < 0) {
|
||||
$this->error = $object->error;
|
||||
$error ++;
|
||||
$this->errors=array_merge($this->errors, $object->errors);
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
|
||||
@ -589,6 +589,7 @@ class Propalmergepdfproduct extends CommonObject
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$object->error;
|
||||
$this->errors=array_merge($this->errors, $object->errors);
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user