We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16cda03 + 5025eb0 commit 8be12e7Copy full SHA for 8be12e7
ext/curl/interface.c
@@ -3429,8 +3429,12 @@ PHP_FUNCTION(curl_error)
3429
RETURN_FALSE;
3430
}
3431
3432
- ch->err.str[CURL_ERROR_SIZE] = 0;
3433
- RETURN_STRING(ch->err.str);
+ if (ch->err.no) {
+ ch->err.str[CURL_ERROR_SIZE] = 0;
3434
+ RETURN_STRING(ch->err.str);
3435
+ } else {
3436
+ RETURN_EMPTY_STRING();
3437
+ }
3438
3439
/* }}} */
3440
0 commit comments