diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 76a2c948636..76680649958 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1863,7 +1863,7 @@ else /* * View */ - $res=$object->fetch_optionals($object->id,$extralabels); + if (!empty($object->id)) $res=$object->fetch_optionals($object->id,$extralabels); //if ($res < 0) { dol_print_error($db); exit; }