mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix phpstan
This commit is contained in:
@@ -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 < 0) {
|
||||||
if ($ret == -2) {
|
if ($ret == -2) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$errormsg = $langs->trans("ErrNoZipEngine");
|
$errormsg = $langs->trans("ErrNoZipEngine");
|
||||||
} else {
|
} else {
|
||||||
$langs->load("errors");
|
$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 : "");
|
$errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir).($errormsg ? "\n" . $errormsg : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user