From 9811569b2be6d8ebe6876d1a302f237cff30e43d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 31 Jul 2021 16:22:50 +0200 Subject: [PATCH] FIX #18289 #18294 --- htdocs/imports/emptyexample.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php index a50a2fc9996..b919a3c4c3e 100644 --- a/htdocs/imports/emptyexample.php +++ b/htdocs/imports/emptyexample.php @@ -102,13 +102,13 @@ if ($attachment) { // List of targets fields -$headerlinefields = array(); -$contentlinevalues = array(); +$headerlinefields = array(); // Array of fields (label to show) +$contentlinevalues = array(); // Array of example values $i = 0; foreach ($fieldstarget as $code => $label) { $withoutstar = preg_replace('/\*/', '', $fieldstarget[$code]); $headerlinefields[] = $langs->transnoentities($withoutstar).($withoutstar != $fieldstarget[$code] ? '*' : '').' ('.$code.')'; - $contentlinevalues[] = $valuestarget[$code]; + $contentlinevalues[] = (isset($valuestarget[$code]) ? $valuestarget[$code] : ''); } //var_dump($headerlinefields); //var_dump($contentlinevalues);