Skip to content

Commit 390ecf3

Browse files
committed
Merge pull request #52 from nesl247/fix_fault_errors
We both had the fault codes wrong. There are only 5 valid FaultCodes for...
2 parents cd003d3 + 57ceb31 commit 390ecf3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Thybag/Auth/SharePointOnlineAuth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public function __doRequest($request, $location, $action, $version, $one_way = f
5555
$response = curl_exec($curl);
5656

5757
// Throw exceptions if there are any issues
58-
if (curl_errno($curl)) throw new \SoapFault(curl_errno($curl), curl_error($curl));
59-
if ($response == '') throw new \SoapFault("No XML returned", "No XML returned");
58+
if (curl_errno($curl)) throw new \SoapFault('Receiver', curl_error($curl));
59+
if ($response == '') throw new \SoapFault('Receiver', "No XML returned");
6060

6161
// Close CURL
6262
curl_close($curl);
@@ -176,7 +176,7 @@ protected function authCurl($url, $payload, $header = false){
176176

177177
// catch error
178178
if($result === false) {
179-
throw new \SoapFault(curl_errno($ch), 'Curl error: ' . curl_error($ch));
179+
throw new \SoapFault('Sender', 'Curl error: ' . curl_error($ch));
180180
}
181181

182182
curl_close($ch);

0 commit comments

Comments
 (0)