Store curl error message directly
This commit is contained in:
parent
768f3979e0
commit
ee6d8c9d58
1 changed files with 2 additions and 5 deletions
7
apps/files_sharing/lib/external/storage.php
vendored
7
apps/files_sharing/lib/external/storage.php
vendored
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue