mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Check around curl_reset to prevent errors with PHP <=5.4
This commit is contained in:
parent
6833f59400
commit
9d59441dd0
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