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 43b10bc

Browse filesBrowse files
committed
bug #11854 [FileSystem] Fix Throw Exception on copying from an unreadable file (Jérémy Derussé)
This PR was merged into the 2.6-dev branch. Discussion ---------- [FileSystem] Fix Throw Exception on copying from an unreadable file | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | NA Two commits on `Filesystem::copy` was merged on diffrentes branches c056a9c and cd5da9b but on the merge operation a `@fopen` was transformed to `fopen` . Thas why, actualy, travis is down on master branch (https://travis-ci.org/symfony/symfony/jobs/34427199#L434) Commits ------- b30317e Ignore warning on fopen
2 parents f940d92 + b30317e commit 43b10bc
Copy full SHA for 43b10bc

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function copy($originFile, $targetFile, $override = false)
5656
}
5757

5858
// Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
59-
if (false === $target = fopen($targetFile, 'w', null, stream_context_create(array('ftp' => array('overwrite' => true))))) {
59+
if (false === $target = @fopen($targetFile, 'w', null, stream_context_create(array('ftp' => array('overwrite' => true))))) {
6060
throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);
6161
}
6262

0 commit comments

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