Skip to content

Commit

Permalink
Merge pull request #4 from J5lx/fix-second-close-in-destructor
Browse files Browse the repository at this point in the history
Don’t close the cURL handle more than once
  • Loading branch information
amouhzi committed Aug 14, 2014
2 parents 4a5a95e + b89b26a commit 82cac3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Curl/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ public function verbose($on=TRUE) {
}

public function close() {
curl_close($this->curl);
if (is_resource($this->curl)) {
curl_close($this->curl);
}
}

public function _exec() {
Expand Down

0 comments on commit 82cac3f

Please sign in to comment.