mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(files_external): Be extra safe with null handling to please psalm
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
2333657fb6
commit
4d060818d1
1 changed files with 3 additions and 0 deletions
|
|
@ -513,6 +513,9 @@ class SFTP extends Common {
|
|||
$result = $this->getConnection()->put($this->absPath($path), $stream);
|
||||
fclose($stream);
|
||||
if ($result) {
|
||||
if ($size === null) {
|
||||
throw new \Exception("Failed to get written size from sftp storage wrapper");
|
||||
}
|
||||
return $size;
|
||||
} else {
|
||||
throw new \Exception("Failed to write steam to sftp storage");
|
||||
|
|
|
|||
Loading…
Reference in a new issue