8000 [HttpFoundation] Check file exists before unlink · symfony/symfony@1954187 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1954187

Browse files
ad-mosnicolas-grekas
authored andcommitted
[HttpFoundation] Check file exists before unlink
1 parent a1a3ffc commit 1954187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function sendContent()
305305
fclose($out);
306306
fclose($file);
307307

308-
if ($this->deleteFileAfterSend) {
308+
if ($this->deleteFileAfterSend && file_exists($this->file->getPathname())) {
309309
unlink($this->file->getPathname());
310310
}
311311

0 commit comments

Comments
 (0)
0