From cf52cbfab5f1672d2065648c7bccb8e011814561 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Apr 2013 23:46:38 +0200 Subject: [PATCH] Fix: Better error management --- htdocs/societe/soc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 772e1b24497..7274c51cf9f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -528,7 +528,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if (empty($object->error) && $socid) { $object = new Societe($db); - $object->fetch($socid); + $result=$object->fetch($socid); + if ($result <= 0) dol_print_error('',$object->error); } $objcanvas->assign_values($action, $socid); // Set value for templates $objcanvas->display_canvas($action); // Show template