From a4c397a68b723cb4390eef76f2fcb83cd4d4a33e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 29 Jan 2025 18:35:54 +0100 Subject: [PATCH 1/2] fix: php 8 warning --- htdocs/expensereport/tpl/expensereport_linktofile.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index 2e02e7b8808..b789360e3f2 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -95,7 +95,7 @@ if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) { } print '
'; - print $thumbshown ? $thumbshown : img_mime($minifile); + print $thumbshown ? $thumbshown : ($minifile ? img_mime($minifile): ''); print '
'; if (empty($urlforhref) || empty($thumbshown)) { From db640de728d7429564b69bcc795ebf0017495631 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Feb 2025 00:02:41 +0100 Subject: [PATCH 2/2] Update expensereport_linktofile.tpl.php --- htdocs/expensereport/tpl/expensereport_linktofile.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index b789360e3f2..689fe8903fb 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -95,7 +95,7 @@ if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) { } print '
'; - print $thumbshown ? $thumbshown : ($minifile ? img_mime($minifile): ''); + print $thumbshown ? $thumbshown : (empty($minifile) ? '' : img_mime($minifile)); print '
'; if (empty($urlforhref) || empty($thumbshown)) {