Skip to content

Document curl_errno/curl_error behavior with multi handles - #5233

Merged
lacatoire merged 2 commits into
php:masterfrom
lacatoire:fix/issue-5047-curl-errno-multi-behavior
Aug 24, 2026
Merged

lacatoire merged 2 commits into
php:masterfrom
lacatoire:fix/issue-5047-curl-errno-multi-behavior

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Add a note to curl_errno() and curl_error() documentation explaining that these functions always return 0 or empty string when the handle was executed via curl_multi_exec(). Users should use curl_multi_info_read() to retrieve errors for individual transfers.

Fixes #5047

Comment thread reference/curl/functions/curl-errno.xml Resolved
Comment thread reference/curl/functions/curl-errno.xml Resolved
Comment thread reference/curl/functions/curl-error.xml Resolved
Comment thread reference/curl/functions/curl-error.xml Resolved
@lacatoire lacatoire closed this Mar 2, 2026
@lacatoire lacatoire reopened this Aug 21, 2026
Add a note to curl_errno() and curl_error() documentation explaining
that these functions always return 0 or empty string when the handle
was executed via curl_multi_exec(). Users should use
curl_multi_info_read() to retrieve errors for individual transfers.

Refs php#5047
@lacatoire
lacatoire force-pushed the fix/issue-5047-curl-errno-multi-behavior branch 2 times, most recently from af2e078 to ae1679d Compare August 24, 2026 08:39
@lacatoire
lacatoire force-pushed the fix/issue-5047-curl-errno-multi-behavior branch from ae1679d to a511529 Compare August 24, 2026 08:43
@lacatoire
lacatoire merged commit ff7a005 into php:master Aug 24, 2026
2 checks passed
@lacatoire
lacatoire deleted the fix/issue-5047-curl-errno-multi-behavior branch August 24, 2026 08:55
KentarouTakeda added a commit to php/doc-ja that referenced this pull request Sep 26, 2026
curl の 3 ファイルを原文の変更に追従しました。これで curl モジュールの未訳・要更新はなくなります。

- `curl_errno()` と `curl_error()` に、`curl_multi_exec()` で実行したハンドルでは `curl_multi_info_read()` がそのハンドルのメッセージを返すまでそれぞれ 0 と空文字列を返す、という注記が追加されました(php/doc-en@ff7a005、php/doc-en#5233。注記の内容は php/doc-en@fa9bae0、php/doc-en#5884 で修正)
- 例のページに、POST リクエストを送る例と、JSON を POST リクエストで送る例が追加されました(php/doc-en@e7c6a2f、php/doc-en#4612)

## 対象ファイル

reference/curl/ (3) — examples.xml, functions/curl-errno.xml, functions/curl-error.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

curl_errno() docs should mention that it always returns 0 when the CurlHandle was executed via a CurlMultiHandle

1 participant