diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index c4fbd00374b..c565fe32894 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -103,7 +103,7 @@ if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) { print '
'; // TODO: Check that $minifile has a proper value here (set in true part of if, not else part). - print $thumbshown ? $thumbshown : img_mime($minifile); + print $thumbshown ? $thumbshown : ($minifile ? img_mime($minifile) : null); print '
'; if (empty($urlforhref) || empty($thumbshown)) {