From 110d0f1d3b34eaf3475bfecbb3b40e02a9dc51fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Apr 2013 22:35:54 +0200 Subject: [PATCH] Fix: Better error management --- htdocs/fourn/facture/fiche.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 1e92ced62ab..470dec637d6 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1253,14 +1253,16 @@ else $productstatic = new Product($db); $object->fetch($id); - $object->fetch_thirdparty(); + $result=$object->fetch_thirdparty(); + if ($result < 0) dol_print_error($db); $societe = new Fournisseur($db); - $societe->fetch($object->socid); + $result=$societe->fetch($object->socid); + if ($result < 0) dol_print_error($db); /* * View card - */ + */ $head = facturefourn_prepare_head($object); $titre=$langs->trans('SupplierInvoice'); dol_fiche_head($head, 'card', $titre, 0, 'bill');