[DOC-CVS] [doc-en] master: Fix GH-4635: Issue with streamWrapper::dir_readdir
[email protected] (Niels Dossche)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Niels Dossche (nielsdos)
Date: 2025-04-29T22:47:34+02:00
Commit: https://github.com/php/doc-en/commit/e652ed93a5ba1f87c8f2058ff2bdfe626cf4a560
Raw diff: https://github.com/php/doc-en/commit/e652ed93a5ba1f87c8f2058ff2bdfe626cf4a560.diff
Fix GH-4635: Issue with streamWrapper::dir_readdir
Changed paths:
M reference/stream/streamwrapper/dir-readdir.xml
Diff:
diff --git a/reference/stream/streamwrapper/dir-readdir.xml b/reference/stream/streamwrapper/dir-readdir.xml
index 7c589a60a0bf..80d4bffb599b 100644
--- a/reference/stream/streamwrapper/dir-readdir.xml
+++ b/reference/stream/streamwrapper/dir-readdir.xml
@@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier> <type>string</type><methodname>streamWrapper::dir_readdir</methodname>
+ <modifier>public</modifier> <type class="union"><type>string</type><type>bool</type></type><methodname>streamWrapper::dir_readdir</methodname>
<void />
</methodsynopsis>
<para>
@@ -30,9 +30,17 @@
Should return <type>string</type> representing the next filename, or
&false; if there is no next file.
</para>
+ <warning>
+ <simpara>
+ Returning <type>true</type> or <type>false</type> will have the same
+ effect of signaling there is no next file. However, returning
+ <type>true</type> is discouraged and <type>false</type> should be
+ used to signal this condition instead.
+ </simpara>
+ </warning>
<note>
<para>
- The return value will be casted to <type>string</type>.
+ A non-boolean return value will be casted to <type>string</type>.
</para>
</note>
</refsect1>