Merge pull request #24583 from BitKFu/Secure-indexFile
Prevent PHP Warning in error log file, when the generated doc file does not exists.
This commit is contained in:
commit
69b2089bf6
@ -5717,7 +5717,11 @@ abstract class CommonObject
|
||||
$update_main_doc_field = 1;
|
||||
}
|
||||
|
||||
$this->indexFile($destfull, $update_main_doc_field);
|
||||
// Check that the file exists, before indexing it.
|
||||
// Hint: It does not exist, if we create a PDF and auto delete the ODT File
|
||||
if (dol_is_file($destfull)) {
|
||||
$this->indexFile($destfull, $update_main_doc_field);
|
||||
}
|
||||
} else {
|
||||
dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user