mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix generation of ODT (test if temporary directory is writable)
This commit is contained in:
@@ -186,6 +186,11 @@ class modPhpbarcode extends ModeleBarCode
|
||||
global $conf, $filebarcode;
|
||||
|
||||
dol_mkdir($conf->barcode->dir_temp);
|
||||
if (!is_writable($conf->barcode->dir_temp)) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp;
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user