summaryrefslogtreecommitdiffstats
path: root/library/SSRS/Soap/NTLM.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/SSRS/Soap/NTLM.php')
-rwxr-xr-xlibrary/SSRS/Soap/NTLM.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/library/SSRS/Soap/NTLM.php b/library/SSRS/Soap/NTLM.php
index 951b14b..32c9ff1 100755
--- a/library/SSRS/Soap/NTLM.php
+++ b/library/SSRS/Soap/NTLM.php
@@ -143,10 +143,15 @@ class SSRS_Soap_NTLM extends SoapClient {
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
}
- $response = curl_exec($handle);
- if (empty($response)) {
+ $response = curl_exec($handle);
+ if($response === false) {
throw new SSRS_Soap_Exception('CURL error: ' . curl_error($handle), curl_errno($handle));
}
+
+ $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
+ if ($httpCode !== 200){
+ throw new SSRS_Soap_Exception('HTTP error: ' . $httpCode);
+ }
curl_close($handle);
$this->_lastResponse = (string) $response;
@@ -161,4 +166,4 @@ class SSRS_Soap_NTLM extends SoapClient {
return $this->_lastResponse;
}
-} \ No newline at end of file
+}