Skip to content

Commit 1fa2e2a

Browse files
committed
Fix phpGH-4635: Issue with streamWrapper::dir_readdir
1 parent 402a727 commit 1fa2e2a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

reference/stream/streamwrapper/dir-readdir.xml

+10-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<refsect1 role="description">
1111
&reftitle.description;
1212
<methodsynopsis>
13-
<modifier>public</modifier> <type>string</type><methodname>streamWrapper::dir_readdir</methodname>
13+
<modifier>public</modifier> <type class="union"><type>string</type><type>bool</type></type><methodname>streamWrapper::dir_readdir</methodname>
1414
<void />
1515
</methodsynopsis>
1616
<para>
@@ -30,9 +30,17 @@
3030
Should return <type>string</type> representing the next filename, or
3131
&false; if there is no next file.
3232
</para>
33+
<warning>
34+
<simpara>
35+
Returning <type>true</type> or <type>false</type> will have the same
36+
effect of signaling there is no next file. However, returning
37+
<type>true</type> is discouraged and <type>false</type> should be
38+
used to signal this condition instead.
39+
</simpara>
40+
</warning>
3341
<note>
3442
<para>
35-
The return value will be casted to <type>string</type>.
43+
A non-boolean return value will be casted to <type>string</type>.
3644
</para>
3745
</note>
3846
</refsect1>

0 commit comments

Comments
 (0)