Store curl error message directly

This commit is contained in:
Vincent Petry 2014-11-04 17:37:15 +01:00
parent 768f3979e0
commit ee6d8c9d58

View file

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