psalm fix

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2023-12-06 17:59:08 +01:00
parent 22237b0f11
commit 3a67bf3f57
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -506,7 +506,7 @@ class SFTP extends Common {
$stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size) {
$size = $writtenSize;
});
if (!$stream) {
if (!is_resource($stream)) {
throw new \Exception("Failed to wrap stream");
}
}