Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blank string check for XML responses #33

Merged
merged 2 commits into from
May 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
"zendframework/zend-i18n": "Required for rendering forms with ZendFramework2",
"zendframework/zend-servicemanager": "Required for rendering forms with ZendFramework2",
"zendframework/zend-view": "Required for rendering forms with ZendFramework2"
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}
10 changes: 6 additions & 4 deletions library/SSRS/Soap/NTLM.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ public function callCurl($url, $data = null, $action = null) {
}

$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
if ($httpCode >= 300 && $httpCode <= 600) {
throw ServerException::fromResponse($response);
} else if ($httpCode !== 200) {
throw new Exception('HTTP error: ' . $httpCode . ' ' . $response, $httpCode, $response);
if ($httpCode !== 200) {
if ($response !== '' && $httpCode >= 300 && $httpCode <= 600) {
throw ServerException::fromResponse($response);
} else {
throw new Exception('HTTP error: ' . $httpCode . ' ' . $response, $httpCode, $response);
}
}
curl_close($handle);

Expand Down