Skip to content
Snippets Groups Projects
Commit 378842e0 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Better error management

parent 8fed036c
No related branches found
No related tags found
No related merge requests found
...@@ -916,20 +916,14 @@ else ...@@ -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);
if ($result < 0) $result=$object->fetch_thirdparty();
{ 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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment