php-mod / curl

This library provides an object-oriented and dependency free wrapper of the PHP cURL extension.
MIT License
328 stars 120 forks source link

Don’t close the cURL handle more than once #4

Closed J5lx closed 10 years ago

J5lx commented 10 years ago

When close() was called more than once PHP warnings appeared stating that "XY is not a valid cURL handle resource". This was especially problematic when close() was called manually because it will also always be called from the destructor. From no on we’ll first check whether $this->curl is still a resource to avoid that.

Besides that: great Job!

J5lx commented 10 years ago

BTW: The Travis CI build already failed before due to the same error (see https://travis-ci.org/php-mod/curl/builds/31105922), so that’s not my fault.

amouhzi commented 10 years ago

Thank you for the pull request, I know for the failure. A new version (1.1.5) for this merge is released.

J5lx commented 10 years ago

Wow, merged after 11 minutes, that was fast! Thanks!