|
@@ -340,8 +340,10 @@ class Builder {
|
|
$responseData = array();
|
|
$responseData = array();
|
|
if( $this->packageOptions[ 'responseObject' ] ) {
|
|
if( $this->packageOptions[ 'responseObject' ] ) {
|
|
$responseData = curl_getinfo( $this->curlObject );
|
|
$responseData = curl_getinfo( $this->curlObject );
|
|
|
|
+ if(curl_errno($this->curlObject)){
|
|
|
|
+ $responseData['errorMessage'] = curl_error($this->curlObject);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
curl_close( $this->curlObject );
|
|
curl_close( $this->curlObject );
|
|
|
|
|
|
if( $this->packageOptions[ 'saveFile' ] ) {
|
|
if( $this->packageOptions[ 'saveFile' ] ) {
|
|
@@ -376,6 +378,7 @@ class Builder {
|
|
$object = new stdClass();
|
|
$object = new stdClass();
|
|
$object->content = $content;
|
|
$object->content = $content;
|
|
$object->status = $responseData[ 'http_code' ];
|
|
$object->status = $responseData[ 'http_code' ];
|
|
|
|
+ $object->error = $responseData['errorMessage'];
|
|
|
|
|
|
return $object;
|
|
return $object;
|
|
}
|
|
}
|