diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index d9467795953..edfe20bce00 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -480,7 +480,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { *ZIP creation */ -$dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->comptabilite->dir_temp); +$dirfortmpfile = (!empty($conf->accounting->dir_temp) ? $conf->accounting->dir_temp : $conf->comptabilite->dir_temp); if (empty($dirfortmpfile)) { setEventMessages($langs->trans("ErrorNoAccountingModuleEnabled"), null, 'errors'); $error++;