Procházet zdrojové kódy

fix(files_external): Be extra safe with null handling to please psalm

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/44533/head
Côme Chilliet před 1 měsícem
rodič
revize
4d060818d1
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3
    0
      apps/files_external/lib/Lib/Storage/SFTP.php

+ 3
- 0
apps/files_external/lib/Lib/Storage/SFTP.php Zobrazit soubor

@@ -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");

Načítá se…
Zrušit
Uložit