Skip to content

Commit 383d1b0

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
2 parents d3caedd + efd00b8 commit 383d1b0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.3.11
44

5+
- Curl:
6+
. Fixed case when curl_error returns an empty string.
7+
(David Carlier)
8+
59
- Soap:
610
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
711

ext/curl/interface.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2869,7 +2869,11 @@ PHP_FUNCTION(curl_error)
28692869

28702870
if (ch->err.no) {
28712871
ch->err.str[CURL_ERROR_SIZE] = 0;
2872-
RETURN_STRING(ch->err.str);
2872+
if (strlen(ch->err.str) > 0) {
2873+
RETURN_STRING(ch->err.str);
2874+
} else {
2875+
RETURN_STRING(curl_easy_strerror(ch->err.no));
2876+
}
28732877
} else {
28742878
RETURN_EMPTY_STRING();
28752879
}

0 commit comments

Comments
 (0)