Skip to content

Commit

Permalink
[HttpFoundation] Check file exists before unlink
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-mos authored and nicolas-grekas committed Jan 25, 2019
1 parent a1a3ffc commit 1954187
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -305,7 +305,7 @@ public function sendContent()
fclose($out);
fclose($file);

if ($this->deleteFileAfterSend) {
if ($this->deleteFileAfterSend && file_exists($this->file->getPathname())) {
unlink($this->file->getPathname());
}

Expand Down

0 comments on commit 1954187

Please sign in to comment.