[HttpFoundation] Check file exists before unlink
This commit is contained in:
parent
a1a3ffc1b9
commit
1954187fac
@ -305,7 +305,7 @@ class BinaryFileResponse extends Response
|
||||
fclose($out);
|
||||
fclose($file);
|
||||
|
||||
if ($this->deleteFileAfterSend) {
|
||||
if ($this->deleteFileAfterSend && file_exists($this->file->getPathname())) {
|
||||
unlink($this->file->getPathname());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user