[Pkg-owncloud-commits] [owncloud] 20/34: Store curl error message directly

David Prévot taffit at moszumanska.debian.org
Fri Nov 7 11:44:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit b509fdb30ff5284c01e4300698d815d1aab42418
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Tue Nov 4 17:37:15 2014 +0100

    Store curl error message directly
---
 apps/files_sharing/lib/external/storage.php | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 41a822f..ec85590 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -200,12 +200,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);
 		}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list