summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-11-04 17:37:15 +0100
committerVincent Petry <pvince81@owncloud.com>2014-11-04 17:37:15 +0100
commitee6d8c9d589c95a12fab5d1a1bcfdd3c6ad8f4c0 (patch)
treef0df588244fa5c16b922fead53628cf7ac1b6d5f /apps
parent768f3979e048d5661fdf84fe3e8174f6d1147df3 (diff)
downloadnextcloud-server-ee6d8c9d589c95a12fab5d1a1bcfdd3c6ad8f4c0.tar.gz
nextcloud-server-ee6d8c9d589c95a12fab5d1a1bcfdd3c6ad8f4c0.zip
Store curl error message directly
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/external/storage.php7
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);
}