Fix: Better error management
This commit is contained in:
parent
8fed036c92
commit
378842e05f
@ -916,20 +916,14 @@ else
|
|||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$result=$object->fetch($id,$ref);
|
$result=$object->fetch($id,$ref);
|
||||||
if ($result > 0)
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
{
|
$result=$object->fetch_lines();
|
||||||
$result=$object->fetch_lines();
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
$result=$object->fetch_thirdparty();
|
||||||
if ($result < 0)
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
{
|
|
||||||
dol_print_error($db,$object->error);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
dol_htmloutput_errors($mesg,'');
|
dol_htmloutput_errors($mesg,'');
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
|
|
||||||
$nbofservices=count($object->lines);
|
$nbofservices=count($object->lines);
|
||||||
|
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user