diff options
-rwxr-xr-x | library/SSRS/Object/CatalogItems.php | 3 | ||||
-rwxr-xr-x | library/SSRS/Soap/NTLM.php | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/library/SSRS/Object/CatalogItems.php b/library/SSRS/Object/CatalogItems.php index c68a964..ac16f77 100755 --- a/library/SSRS/Object/CatalogItems.php +++ b/library/SSRS/Object/CatalogItems.php @@ -5,6 +5,9 @@ * * @author arron */ + +require_once('ArrayIterator.php'); + class SSRS_Object_CatalogItems extends SSRS_Object_ArrayIterator { public $iteratorKey = 'CatalogItems'; 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 +} |