From ed9d616c35f142ede52cb1e086f84f63f77c1b51 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 27 Feb 2025 13:59:43 +0100 Subject: [PATCH] Fix phpstan --- htdocs/admin/tools/export_files.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index bc52bcadc4a..19d39a72336 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -165,13 +165,14 @@ if ($compression == 'zip') { } } - $ret = dol_compress_dir($fulldirtocompress, $outputdir."/".$file, $compression, $excludefiles, $rootdirinzip); + $ret = dol_compress_dir($fulldirtocompress, $outputdir."/".$file, $compression, $excludefiles, $rootdirinzip); // Can modify $errormsg if ($ret < 0) { if ($ret == -2) { $langs->load("errors"); $errormsg = $langs->trans("ErrNoZipEngine"); } else { $langs->load("errors"); + // @phpstan-ignore-next-line The $errormsg can have been modified by the dol_compress_dir function. $errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir).($errormsg ? "\n" . $errormsg : ""); } }