From 3a67bf3f577513ac5fe1bdb6c0a88b46d94d5387 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 6 Dec 2023 17:59:08 +0100 Subject: [PATCH] psalm fix Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } }