From cc2af5eec0703ab095287f2b97766d6c8a0a7059 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sun, 2 Mar 2025 14:04:27 +0100 Subject: [PATCH] Debug v21, missing error message --- htdocs/core/lib/files.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 9e74d7daf31..576e2fc0014 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1983,7 +1983,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionor // Move file from temp directory to final directory. A .noexe may also be appended on file name. $resupload = dol_move_uploaded_file($TFile['tmp_name'][$i], $destfull, $allowoverwrite, 0, $TFile['error'][$i], 0, $varfiles, $upload_dir); - if (is_numeric($resupload) && $resupload > 0) { // $resupload can be 'ErrorFileAlreadyExists' + if (is_numeric($resupload) && $resupload > 0) { // $resupload can be 'ErrorFileAlreadyExists', 'ErrorFileIsInfectedWithAVirus...' include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmparraysize = getDefaultImageSizes(); @@ -2047,7 +2047,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionor if (preg_match('/File is a PDF with javascript inside/', $resupload)) { setEventMessages($langs->trans("ErrorFileIsAnInfectedPDFWithJSInside"), null, 'errors'); } else { - setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); + setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus").'
'.dolGetFirstLineOfText($resupload), null, 'errors'); } } else { // Known error setEventMessages($langs->trans($resupload), null, 'errors');