diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index 0b5cbc2..970f567 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -133,6 +133,7 @@ class Curl if (is_resource($this->curl)) { curl_close($this->curl); } + $this->json_decoder = null; } public function complete($callback) diff --git a/tests/PHPCurlClass/PHPCurlClassTest.php b/tests/PHPCurlClass/PHPCurlClassTest.php index 8fa6258..5ccaf77 100644 --- a/tests/PHPCurlClass/PHPCurlClassTest.php +++ b/tests/PHPCurlClass/PHPCurlClassTest.php @@ -669,7 +669,8 @@ class CurlTest extends PHPUnit_Framework_TestCase $this->assertEquals('cookie1=scrumptious,cookie2=mouthwatering', $test->curl->response_headers['Set-Cookie']); } - public function testDefaultTimeout() { + public function testDefaultTimeout() + { $test = new Test(); $test->server('timeout', 'GET', array( 'seconds' => '31', @@ -681,7 +682,8 @@ class CurlTest extends PHPUnit_Framework_TestCase $this->assertFalse($test->curl->http_error); } - public function testTimeoutError() { + public function testTimeoutError() + { $test = new Test(); $test->curl->setTimeout(5); $test->server('timeout', 'GET', array( @@ -694,7 +696,8 @@ class CurlTest extends PHPUnit_Framework_TestCase $this->assertFalse($test->curl->http_error); } - public function testTimeout() { + public function testTimeout() + { $test = new Test(); $test->curl->setTimeout(10); $test->server('timeout', 'GET', array(