[GIT-PULLS] [php-src] PR #22705: Show curl option name in error message

[email protected] (Sjord)
Newsgroups php.git-pulls
Message-ID <E73oMXgESuAM4aiEmloHzMgZ9ZwzwN06NQXCk5fj84E@main.internal.php.net>
Pull Request: https://github.com/php/php-src/pull/22705
Author: Sjord

Use 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.