Debug v21 error when failed to write file
This commit is contained in:
parent
db3780d70d
commit
b49b676fcb
1 changed files with 9 additions and 3 deletions
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue