mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-20 20:13:40 +03:00
Merge pull request #110 from richard-underwood/issue-109
PHP <= 5.4 fix for curl_reset
This commit is contained in:
commit
531f8a2609
1 changed files with 5 additions and 1 deletions
|
@ -44,7 +44,11 @@ class ApiHandler {
|
||||||
$this->authheaders();
|
$this->authheaders();
|
||||||
$this->addheader('Accept', 'application/json');
|
$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_HTTPHEADER, Array());
|
||||||
curl_setopt($this->curlh, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($this->curlh, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue