type fixes

This commit is contained in:
Robin Appelman 2021-03-09 18:10:27 +01:00
commit 7cb4e41f8a
7 changed files with 32 additions and 7 deletions

View file

@ -355,9 +355,14 @@ class Share extends AbstractShare {
// use a close callback to ensure the upload is finished before continuing
// this also serves as a way to keep the connection in scope
return CallbackWrapper::wrap($fh, null, null, function () use ($connection) {
$stream = CallbackWrapper::wrap($fh, null, null, function () use ($connection) {
$connection->close(false); // dont terminate, give the upload some time
});
if (is_resource($stream)) {
return $stream;
} else {
throw new InvalidRequestException($target);
}
}
/**