diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-01 14:55:15 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-01 14:55:15 +0100 |
commit | 8be12e770f965f1334be231ffc946fbd78391f7b (patch) | |
tree | 239e35a18ace652ce72073658a0c2d096831ddfb /ext/curl/interface.c | |
parent | 16cda039b5db1847b01ab33be2fc8966ab50aaf5 (diff) | |
parent | 5025eb05bde83a0a51eb0668c45c240b366545bf (diff) | |
download | php-git-8be12e770f965f1334be231ffc946fbd78391f7b.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r-- | ext/curl/interface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index ef0eee9578..11b6127051 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -3429,8 +3429,12 @@ PHP_FUNCTION(curl_error) RETURN_FALSE; } - ch->err.str[CURL_ERROR_SIZE] = 0; - RETURN_STRING(ch->err.str); + if (ch->err.no) { + ch->err.str[CURL_ERROR_SIZE] = 0; + RETURN_STRING(ch->err.str); + } else { + RETURN_EMPTY_STRING(); + } } /* }}} */ |