Uh oh!
There was an error while loading. Please reload this page.
ext/curl: show curl option name in error message - #22908
Conversation
Sjord
commented
Jul 28, 2026
@GrahamCampbell What do you think about this fallback in case curl_easy_option_by_id is not available? |
Sjord
commented
Jul 29, 2026
I think this is currently OK and can probably be fixed in the future. I am also wondering if it makes sense to loop through zend_constants as a fallback when curl_easy_option_by_id returns null, but I can't think of a situation where that would result in anything. |
Uh oh!
There was an error while loading. Please reload this page.
GrahamCampbell
commented
Jul 29, 2026
Should this get a short Curl entry in |
Uh oh!
There was an error while loading. Please reload this page.
Sjord
commented
Jul 29, 2026
@GrahamCampbell Thanks, great feedback. |
Uh oh!
There was an error while loading. Please reload this page.
0c92a07 to
37c402bCompareUse curl_easy_option_by_id to retrieve the name of the option, and also show the name of the option in the case where strings contain a null byte. curl_easy_option_by_id simplifies the code, but was introduced in curl 7.73.0, so this also bumps the minimum version of curl. 7.73.0 was released in 2020, so I think that's acceptable. Showing the option name is especially useful when using curl_setopt_array. A user may specify many options, and this change makes it clear which option is wrong exactly.
- Add line to NEWS - Test more values for writable file handles - Fallback to zend_constants if curl_easy_option_by_id fails
37c402b to
040221cCompareSjord
commented
Aug 4, 2026
This is ready. |
Sjord
commented
Aug 6, 2026
@arnaud-lb Could you take a look at this, and perhaps merge it? |
Uh oh!
There was an error while loading. Please reload this page.
arnaud-lb
commented
Aug 6, 2026
Thank you! |
Retrieve the option name by using curl_easy_option_by_id or by walking zend_constants, depending on whether the curl version used has curl_easy_option_by_id.
Showing the option name is especially useful when using curl_setopt_array. A user may specify many options, and this change makes it clear which option is wrong exactly.
Related to #10097, #22705.