diff options
-rw-r--r-- | apps/files_sharing/lib/external/storage.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index 2da0022028f..3f1d631a35f 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -206,12 +206,9 @@ class Storage extends DAV implements ISharedStorage { $result = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - $errorMessage = null; - if ($status === 0) { - $errorMessage = curl_error($ch); - } + $errorMessage = curl_error($ch); curl_close($ch); - if ($errorMessage) { + if (!empty($errorMessage)) { throw new \Exception($errorMessage); } |