diff options
author | arron.woods@gmail.com <arron.woods@gmail.com@deae1e92-32f9-c189-e222-5b9b5081a27a> | 2012-10-01 16:26:47 +0000 |
---|---|---|
committer | arron.woods@gmail.com <arron.woods@gmail.com@deae1e92-32f9-c189-e222-5b9b5081a27a> | 2012-10-01 16:26:47 +0000 |
commit | a2b0ffb492bbd963e3e5bdc8e6bedbaa0060f10f (patch) | |
tree | 446976876d2853ec1df808e2a81909b6e6693398 /library/SSRS/Soap/NTLM.php | |
parent | 7b918b07e5285cc752caf93f0558766bb24b6637 (diff) | |
download | php-ssrs-a2b0ffb492bbd963e3e5bdc8e6bedbaa0060f10f.zip php-ssrs-a2b0ffb492bbd963e3e5bdc8e6bedbaa0060f10f.tar.gz php-ssrs-a2b0ffb492bbd963e3e5bdc8e6bedbaa0060f10f.tar.bz2 |
Server exception
Diffstat (limited to 'library/SSRS/Soap/NTLM.php')
-rwxr-xr-x | library/SSRS/Soap/NTLM.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/SSRS/Soap/NTLM.php b/library/SSRS/Soap/NTLM.php index 0562c6d..929a642 100755 --- a/library/SSRS/Soap/NTLM.php +++ b/library/SSRS/Soap/NTLM.php @@ -47,7 +47,7 @@ class SSRS_Soap_NTLM extends SoapClient { return $this->_uri; } - public function setCacheExpiry($cacheExpiry=86400) { + public function setCacheExpiry($cacheExpiry = 86400) { $this->_cacheExpiry = $cacheExpiry; return $this; } @@ -141,7 +141,7 @@ class SSRS_Soap_NTLM extends SoapClient { curl_setopt($handle, CURLOPT_POSTFIELDS, $data); } - if($action !== null){ + if ($action !== null) { $headers[] = 'SOAPAction: "' . $action . '"'; } @@ -153,7 +153,9 @@ class SSRS_Soap_NTLM extends SoapClient { } $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE); - if ($httpCode !== 200) { + if ($httpCode >= 300 && $httpCode <= 600) { + throw SSRS_Soap_ServerException::fromResponse($response); + } else if ($httpCode !== 200) { throw new SSRS_Soap_Exception('HTTP error: ' . $httpCode . ' ' . $response, $httpCode, $response); } curl_close($handle); |