Skip to content

Commit

Permalink
UNRELATED CHANGE - put test around curl_reset to allow testing on PHP…
Browse files Browse the repository at this point in the history
… 5.4
  • Loading branch information
richard-underwood committed Aug 26, 2016
1 parent befb891 commit 2cb95a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/class/ApiHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ private function curlopts() {
$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);

Expand Down

0 comments on commit 2cb95a6

Please sign in to comment.