mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Debug v21 error when failed to write file
This commit is contained in:
@@ -1573,9 +1573,15 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify
|
||||
dol_mkdir(dirname($filetosave));
|
||||
|
||||
$fp = fopen($filetosave, "w");
|
||||
fwrite($fp, $tmpgeturl['content']);
|
||||
fclose($fp);
|
||||
dolChmod($filetosave);
|
||||
if ($fp) {
|
||||
fwrite($fp, $tmpgeturl['content']);
|
||||
fclose($fp);
|
||||
dolChmod($filetosave);
|
||||
} else {
|
||||
$error++;
|
||||
setEventMessages('Error failed to open file '.$filetosave.' for writing', null, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user