mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
ext/curl: curl_error using curl_easy_strerror if CURLOPT_ERRORBUFFER
did not fill the error buffer. close GH-14984
This commit is contained in:
parent
911dc5b46c
commit
efd00b8ff0
2 changed files with 9 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -2,6 +2,10 @@ PHP NEWS
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
?? ??? ????, PHP 8.2.23
|
?? ??? ????, PHP 8.2.23
|
||||||
|
|
||||||
|
- Curl:
|
||||||
|
. Fixed case when curl_error returns an empty string.
|
||||||
|
(David Carlier)
|
||||||
|
|
||||||
- Soap:
|
- Soap:
|
||||||
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
|
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
|
||||||
|
|
||||||
|
|
|
@ -2764,7 +2764,11 @@ PHP_FUNCTION(curl_error)
|
||||||
|
|
||||||
if (ch->err.no) {
|
if (ch->err.no) {
|
||||||
ch->err.str[CURL_ERROR_SIZE] = 0;
|
ch->err.str[CURL_ERROR_SIZE] = 0;
|
||||||
RETURN_STRING(ch->err.str);
|
if (strlen(ch->err.str) > 0) {
|
||||||
|
RETURN_STRING(ch->err.str);
|
||||||
|
} else {
|
||||||
|
RETURN_STRING(curl_easy_strerror(ch->err.no));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
RETURN_EMPTY_STRING();
|
RETURN_EMPTY_STRING();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue