mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-18 19:59:30 +03:00
UNRELATED CHANGE - put test around curl_reset to allow testing on PHP 5.4
This commit is contained in:
parent
befb891174
commit
2cb95a6959
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue