FIX checking if file was open (#29871)

This commit is contained in:
lamrani abdelwadoud 2024-06-07 16:30:53 +02:00 committed by GitHub
parent 56290e2e4e
commit 5eede37cb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1707,7 +1707,7 @@ class BonPrelevement extends CommonObject
dol_syslog(get_class($this) . "::generate build file=" . $this->filename . " type=" . $type);
$this->file = fopen($this->filename, "w");
if (empty($this->file)) {
if ($this->file == false) {
$this->error = $langs->trans('ErrorFailedToOpenFile', $this->filename);
return -1;
}