Bug #62256 [NEW]: SCANDIR_SORT_NONE undefined
| From: | gem at rellim dot com | Date: | Thu, 07 Jun 2012 23:21:38 +0000 |
| Subject: | Bug #62256 [NEW]: SCANDIR_SORT_NONE undefined | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-8434@lists.php.net to get a copy of this message | ||
From: gem at rellim dot com
Operating system: Gentoo
PHP version: 5.3.13
Package: Documentation problem
Bug Type: Bug
Bug description:SCANDIR_SORT_NONE undefined
Description:
------------
The scandir() doc page mentions an optional 2nd parameter that may contain
SCANDIR_SORT_NONE. But that constant does not exist.
http://us3.php.net/manual/en/function.scandir.php
If I grep the PHP source I can not find any match for SCANDIR_ anywhere.
Test script:
---------------
<?php
$files = scandir( '/tmp', SCANDIR_SORT_NONE);
$cnt = count($files);
echo "{$cnt}\n";
?>
Expected result:
----------------
I expect a count of files in /tmp.
Actual result:
--------------
# php tmp.php
PHP Notice: Use of undefined constant SCANDIR_SORT_NONE - assumed
'SCANDIR_SORT_NONE' in /tmp/tmp.php on line 2
PHP Stack trace:
PHP 1. {main}() /tmp/tmp.php:0
PHP Warning: scandir() expects parameter 2 to be long, string given in
/tmp/tmp.php on line 2
PHP Stack trace:
PHP 1. {main}() /tmp/tmp.php:0
PHP 2. scandir() /tmp/tmp.php:2
0
--
Edit bug report at https://bugs.php.net/bug.php?id=62256&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62256&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62256&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62256&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62256&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62256&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62256&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62256&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62256&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62256&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62256&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62256&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62256&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62256&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62256&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62256&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62256&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62256&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62256&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62256&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62256&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62256&r=mysqlcfg