Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dbc4148

Browse filesBrowse files
committed
[Filesystem] Check that the directory is writable after created it in dumpFile()
1 parent 182dd8f commit dbc4148
Copy full SHA for dbc4148

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎src/Symfony/Component/Filesystem/Filesystem.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,9 @@ public function dumpFile($filename, $content, $mode = 0666)
498498

499499
if (!is_dir($dir)) {
500500
$this->mkdir($dir);
501-
} elseif (!is_writable($dir)) {
501+
}
502+
503+
if (!is_writable($dir)) {
502504
throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
503505
}
504506

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.