Fixed PHP 7.2 Warning: count(): Parameter must be an array or an object that implements Countable


Fixed PHP 7.2

Warning: count(): Parameter must be an array or an object that implements Countable

Credit : 
https://github.com/guzzle/guzzle/pull/2038/commits/f8265f45535e35e4fa5d4f7f3d3d916a82f802b7

Fixed by....

$resource = $easy->handle;
unset($easy->handle);

if (count($this->handles) >= $this->maxHandles) { /* OLD */
if (is_array($this-handles) && count($this->handles) >= $this->maxHandles) { /* NEW */

    curl_close($resource);

} else {...
Previous
Next Post »

1 Comments:

Write Comments