UNRELATED CHANGE - put test around curl_reset to allow testing on PHP 5.4

This commit is contained in:
Richard Underwood 2016-08-26 09:30:56 +01:00
parent befb891174
commit 2cb95a6959

View file

@ -44,7 +44,11 @@ class ApiHandler {
$this->authheaders();
$this->addheader('Accept', 'application/json');
curl_reset($this->curlh);
if(defined('curl_reset')) {
curl_reset($this->curlh);
} else {
$this->curlh = curl_init();
}
curl_setopt($this->curlh, CURLOPT_HTTPHEADER, Array());
curl_setopt($this->curlh, CURLOPT_RETURNTRANSFER, 1);