Skip to content

Conversation

@mn7z
Copy link
Contributor

@mn7z mn7z commented Nov 8, 2017

Description

After updating lib version started seeing errors with curl_reset() in Pusher.php:268 saying that expected a resource type but got an int (value: 0).

Why and how $ch variables becomes 0 - I did not have enough time to dig deeper and reproduce it in isolated environment, but because $ch becomes 0 then curl_init() does not happen on attempt to reuse the handle. So the proposed fix is to check explicitly for resource type instead of null, which IMHO is more accurate and less error prone.

Additional info

This might be due php/curl version combination, but its a long shot. Leaving here some details about the environment where it did happen, while I understand this might not be enough for reproducing the issue.

php version: 7.1.5
curl version: curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.19.1 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3

Copy link
Contributor

@WillSewell WillSewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, interesting that this can happen...

check explicitly for resource type instead of null, which IMHO is more accurate and less error prone.

Yes I agree! That's reason enough for me.

Thanks.

@WillSewell WillSewell merged commit d88d269 into pusher:master Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants