php-vcr/php-vcr — pull request #83 by yateric (2014-12-10 08:28:25+00:00)
Title: Add null check for CURLOPT_READFUNCTION

In the recent version of guzzle, when it do curl_reset(), it will also reset some curl options manually for some reason (see: https://github.com/guzzle/RingPHP/blob/3ea2fc9236d3b10e87115d07a9e0070c1afe430d/src/Client/CurlHandler.php#L109).

Because it set CURLOPT_READFUNCTION to null, and at the same time CURLOPT_INFILESIZE may not be set, so php-vcr will throw the CURLOPT_INFILESIZE check exception.

Just added the null check before it can solve this issue and now php-vcr should compatible with guzzle version 4 / 5.