Skip to content

Commit 910bc3b

Browse files
authored
bugfix (#4306)
1 parent d70250e commit 910bc3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Files/Disk.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ public function copy(TemporaryFile $source, string $destination): bool
6868
{
6969
$readStream = $source->readStream();
7070

71+
if (!is_resource($readStream)) {
72+
return false;
73+
}
74+
7175
if (realpath($destination)) {
7276
$tempStream = fopen($destination, 'rb+');
7377
$success = stream_copy_to_stream($readStream, $tempStream) !== false;

0 commit comments

Comments
 (0)