Fix generation of ODT (test if temporary directory is writable)

This commit is contained in:
Laurent Destailleur
2021-06-20 05:11:46 +02:00
parent 1a6647e690
commit e3e2dfd764
26 changed files with 162 additions and 57 deletions

View File

@@ -290,7 +290,11 @@ class doc_generic_order_odt extends ModelePDFCommandes
//print "conf->societe->dir_temp=".$conf->societe->dir_temp;
dol_mkdir($conf->commande->dir_temp);
if (!is_writable($conf->commande->dir_temp)) {
$this->error = "Failed to write in temp directory ".$conf->commande->dir_temp;
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
return -1;
}
// If CUSTOMER contact defined on order, we use it
$usecontact = false;