From:             xuefer at 21cn dot com
Operating system: linux
PHP version:      4.3.7
PHP Bug Type:     Directory function related
Bug description:  glob() nomatch return false

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 bug report at http://bugs.php.net/?id=28649&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28649&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28649&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28649&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28649&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28649&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28649&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28649&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28649&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28649&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28649&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28649&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28649&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28649&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28649&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28649&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28649&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28649&r=float

Reply via email to