summaryrefslogtreecommitdiffstats
path: root/library/SSRS/Soap
diff options
context:
space:
mode:
authorArron Woods <aw@chartblocks.com>2015-05-13 15:57:56 +0100
committerArron Woods <aw@chartblocks.com>2015-05-13 15:57:56 +0100
commit0994427a5b75bba964cd56142e7f5d34a79a2422 (patch)
tree48504844e250a7f0973445e9fb1274f3335d880a /library/SSRS/Soap
parente7743c4ab7d56847719cd6b558e6532204716668 (diff)
downloadphp-ssrs-0994427a5b75bba964cd56142e7f5d34a79a2422.zip
php-ssrs-0994427a5b75bba964cd56142e7f5d34a79a2422.tar.gz
php-ssrs-0994427a5b75bba964cd56142e7f5d34a79a2422.tar.bz2
Curl options must be an array
Diffstat (limited to 'library/SSRS/Soap')
-rwxr-xr-xlibrary/SSRS/Soap/NTLM.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/library/SSRS/Soap/NTLM.php b/library/SSRS/Soap/NTLM.php
index a48b33b..33b4fd6 100755
--- a/library/SSRS/Soap/NTLM.php
+++ b/library/SSRS/Soap/NTLM.php
@@ -13,7 +13,7 @@ class NTLM extends \SoapClient {
protected $_cacheExpiry;
protected $_lastRequest;
protected $_lastResponse;
- protected $_curlOptions;
+ protected $_curlOptions = array();
function __construct($wsdl, $options = array()) {
if (empty($options['cache_wsdl_path'])) {
@@ -117,15 +117,14 @@ class NTLM extends \SoapClient {
$this->cacheWSDL($wsdlContent);
}
}
-
- public function setCurlOptions($curl_options) {
- $this->_curlOptions = $curl_options;
+
+ public function setCurlOptions(array $curl_options) {
+ $this->_curlOptions = $curl_options;
}
-
+
public function getCurlOptions() {
- return $this->_curlOptions;
+ return $this->_curlOptions;
}
-
public function __doRequest($request, $location, $action, $version = 1, $one_way = null) {
$this->_lastRequest = (string) $request;
@@ -143,10 +142,10 @@ class NTLM extends \SoapClient {
curl_setopt($handle, CURLOPT_USERPWD, $this->_username . ':' . $this->_passwd);
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
-
+
//set additional curl options
foreach ($this->getCurlOptions() as $key => $value) {
- curl_setopt($handle, $key, $value);
+ curl_setopt($handle, $key, $value);
}
$headers = $this->generateHeaders($url, $data, $action);