diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 84b051d24f3..2393524e572 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -40,7 +40,7 @@ if ($action == 'presend') { $titreform = 'SendMail'; $object->fetch_projet(); - + if (!isset($file)) $file = null; $ref = dol_sanitizeFileName($object->ref); if (!in_array($object->element, array('user', 'member'))) { //$fileparams['fullname'] can be filled from the card @@ -57,7 +57,7 @@ if ($action == 'presend') { } } - $file = $fileparams['fullname']; + $file = isset($fileparams['fullname'])?$fileparams['fullname']:null; } // Define output language