diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 9d8c27dfa8d03..80b1472ce6664 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -506,7 +506,7 @@ public function writeStream(string $path, $stream, int $size = null): int { $stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size) { $size = $writtenSize; }); - if (!$stream) { + if (!is_resource($stream)) { throw new \Exception("Failed to wrap stream"); } }