Bug #28649 [Com]: glob() nomatch return false
| From: | info at hi5job dot com | Date: | Fri, 24 Sep 2021 07:12:30 +0000 |
| Subject: | Bug #28649 [Com]: glob() nomatch return false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236804@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=28649&edit=1
ID: 28649
Comment by: info at hi5job dot com
Reported by: xuefer at 21cn dot com
Summary: glob() nomatch return false
Status: Closed
Type: Bug
Package: Directory function related
Operating System: linux
PHP Version: 4.3.7
Block user comment: N
Private report: N
New Comment:
https://hi5job.com
https://hi5job.com/blog
https://hi5job.com/jobs
Apply latest Jobs
Previous Comments:
------------------------------------------------------------------------
[2004-12-13 01:27:18] sniper@php.net
Fixed.
------------------------------------------------------------------------
[2004-09-01 10:27:02] derick@php.net
Reopening because of: http://bugs.php.net/bug.php?id=29928
------------------------------------------------------------------------
[2004-06-06 18:21:34] iliaa@php.net
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.
------------------------------------------------------------------------
[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 https://bugs.php.net/bug.php?id=28649&edit=1