[DOC-CVS] [doc-en] master: unset is not guaranteed to flush cookie list. (#4879)
[email protected] (divinity76 via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: divinity76 (divinity76)
Committer: GitHub (web-flow)
Pusher: Crell
Date: 2025-10-03T09:34:55-05:00
Commit: https://github.com/php/doc-en/commit/6d21eef094840a7277af4735b8898f70ef9cd9ba
Raw diff: https://github.com/php/doc-en/commit/6d21eef094840a7277af4735b8898f70ef9cd9ba.diff
unset is not guaranteed to flush cookie list. (#4879)
unset() happens to work if the curl handle reference count reach zero, which unset does not guarantee. better to use CURLOPT_COOKIELIST "flush"
Changed paths:
M reference/curl/constants_curl_setopt.xml
Diff:
diff --git a/reference/curl/constants_curl_setopt.xml b/reference/curl/constants_curl_setopt.xml
index 783ed8fa05b0..522e1207c2c8 100644
--- a/reference/curl/constants_curl_setopt.xml
+++ b/reference/curl/constants_curl_setopt.xml
@@ -338,7 +338,7 @@
As of PHP 8.0.0, <function>curl_close</function> is a no-op
and does <emphasis>not</emphasis> destroy the handle.
If cookies need to be written prior to the handle being automatically
- destroyed, call <function>unset</function> on the handle.
+ destroyed, run <code>curl_setopt($ch, CURLOPT_COOKIELIST, "FLUSH");</code>.
</simpara>
</warning>
</para>