We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39864de commit b6c3d8dCopy full SHA for b6c3d8d
src/Utils/FileSystem.php
@@ -58,7 +58,7 @@ public static function copy(string $source, string $dest, bool $overwrite = true
58
59
} else {
60
static::createDir(dirname($dest));
61
- if (@stream_copy_to_stream(fopen($source, 'r'), fopen($dest, 'w')) === false) { // @ is escalated to exception
+ if (($s = @fopen($source, 'r')) && ($d = @fopen($dest, 'w')) && @stream_copy_to_stream($s, $d) === false) { // @ is escalated to exception
62
throw new Nette\IOException("Unable to copy file '$source' to '$dest'. " . self::getLastError());
63
}
64
0 commit comments