Curl/WsdlGenerator - better error handling
This commit is contained in:
parent
4edc46e67f
commit
f276a30a47
@ -158,7 +158,7 @@ class Curl
|
||||
$location
|
||||
);
|
||||
|
||||
if (!is_integer($httpResponseCode) || $httpResponseCode >= 400) {
|
||||
if (!is_integer($httpResponseCode) || $httpResponseCode >= 400 || $httpResponseCode === 0) {
|
||||
|
||||
return new CurlResponse(
|
||||
$httpRequestHeadersAsString,
|
||||
|
@ -75,7 +75,7 @@ class WsdlDownloader
|
||||
$curlResponse = $curl->executeCurlWithCachedSession($wsdlPath);
|
||||
if ($curlResponse->curlStatusSuccess()) {
|
||||
if (mb_strlen($curlResponse->getResponseBody()) === 0) {
|
||||
throw new Exception('Could not write WSDL cache file: curl response empty');
|
||||
throw new Exception('Could not write WSDL cache file: empty curl response from: '.$wsdlPath);
|
||||
}
|
||||
if ($resolveRemoteIncludes === true) {
|
||||
$document = $this->getXmlFileDOMDocument($curl, $cacheType, $curlResponse->getResponseBody(), $wsdlPath);
|
||||
|
Loading…
Reference in New Issue
Block a user