Skip to content

Commit 8be12e7

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 16cda03 + 5025eb0 commit 8be12e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/curl/interface.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3429,8 +3429,12 @@ PHP_FUNCTION(curl_error)
34293429
RETURN_FALSE;
34303430
}
34313431

3432-
ch->err.str[CURL_ERROR_SIZE] = 0;
3433-
RETURN_STRING(ch->err.str);
3432+
if (ch->err.no) {
3433+
ch->err.str[CURL_ERROR_SIZE] = 0;
3434+
RETURN_STRING(ch->err.str);
3435+
} else {
3436+
RETURN_EMPTY_STRING();
3437+
}
34343438
}
34353439
/* }}} */
34363440

0 commit comments

Comments
 (0)