#28649 [Opn->Csd]: glob() nomatch return false
| From: | iliaa@php.net | Date: | Sun, 06 Jun 2004 16:21:37 +0000 |
| Subject: | #28649 [Opn->Csd]: glob() nomatch return false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60434@lists.php.net to get a copy of this message | ||
ID: 28649
Updated by: iliaa@php.net
Reported By: xuefer at 21cn dot com
-Status: Open
+Status: Closed
Bug Type: Directory function related
Operating System: linux
PHP Version: 4.3.7
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-06-06 15:06:13] xuefer at 21cn dot com
Description:
------------
i don't know what this modify do, but it broke what the comment say.
relatived to #28289 ?
http://bugs.php.net/bug.php?id=28289
@@ -388,10 +390,14 @@
/* Linux handles no matches as an error
condition, but FreeBSD
* doesn't. This ensure that if no match is
found, an empty array
* is always returned so it can be used without
worrying in e.g.
* foreach() */
+#if __linux__
+ RETURN_FALSE;
+#else
array_init(return_value);
return;
+#endif
Reproduce code:
---------------
php -r 'var_dump(glob("abcdefg"));'
Expected result:
----------------
an empty array()
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28649&edit=1