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