-
Notifications
You must be signed in to change notification settings - Fork 820
curl_multi_init: fix return description #2591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ref.: https://github.com/php/php-src/blob/master/ext/curl/multi.c#L60 (stub: `function curl_multi_init(): CurlMultiHandle {}`) ⇒ "Stubs are the authoriative source of truth. The descriptions in the manual are sometimes buggy due to them not being syncronized with the stubs via automatic tooling (unlike signatures)." - Máté Kocsis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably also adjust curl_init
. With regard to consistency curl_share_init
does not ist the word "object".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it is missing en Error/Exception section as I imagine it now throws an error on failure? Or did that just never occur?
@TimWolla |
Okay so the implementation never fails, but we don't check if it has been properly initialized looking at the cURL docs: https://curl.se/libcurl/c/curl_multi_init.html |
Fun. I fully expected it to throw and thus didn't check. |
Merging, as this is a improvement as it is. Thanks! |
Return value If this function returns NULL, something went wrong and you cannot use the other curl functions. => Sounds like it doesn't always return a new object. 🤔 |
ref.: https://github.com/php/php-src/blob/master/ext/curl/multi.c#L60 (stub: `function curl_multi_init(): CurlMultiHandle {}`)
edit: hmm this isn't an issue, this is a PR 🤔 |
related PR php/php-src#13157 fwiw prior to that PR (php <8.4.0-dev?) it returns a broken curl_multi handle on failure |
Could you open a new issue about this, or add an entry to UPGRADING in the php-src PR so this does not get forgotten. |
ref.: https://github.com/php/php-src/blob/master/ext/curl/multi.c#L60 (stub:
function curl_multi_init(): CurlMultiHandle {}
)⇒ "Stubs are the authoriative source of truth. The descriptions in the manual are sometimes buggy due to them not being syncronized with the stubs via automatic tooling (unlike signatures)." - Máté Kocsis (https://twitter.com/kocsismate90/status/1681912594024525824)