#39090 [NEW]: DirectoryFilterDots doxygen docs and example is wrong
| From: | judas dot iscariote at gmail dot com | Date: | Mon, 09 Oct 2006 09:51:55 +0000 |
| Subject: | #39090 [NEW]: DirectoryFilterDots doxygen docs and example is wrong | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-103289@lists.php.net to get a copy of this message | ||
From: judas dot iscariote at gmail dot com
Operating system: Irrelevant
PHP version: 5CVS-2006-10-09 (CVS)
PHP Bug Type: SPL related
Bug description: DirectoryFilterDots doxygen docs and example is wrong
Description:
------------
DirectoryFilterDots example [1] ) and docs [2] are wrong.
example [1] says :
parent::__construct(new DirectoryIterator($path));
must say :
parent::__construct(new RecursiveDirectoryIterator($path));
Documentation say:
This Iteraotr takes a pathname from which it creates a
DirectoryIterator...
must say :
This **Iterator** takes a pathname from which it creates a
**RecursiveDirectoryIterator**...
[1] ext/spl/examples/directoryfilterdots.inc
[2] http://www.php.net/~helly/php/ext/spl/classDirectoryFilterDots.html
Reproduce code:
---------------
<?php
require_once dirname(__FILE__) . '/directoryfilterdots.inc';
$foo = new DirectoryFilterDots(dirname(__FILE__));
?>
Expected result:
----------------
shiny new iterator containing the directory listing without dots.
Actual result:
--------------
Catchable fatal error: Argument 1 passed to
RecursiveFilterIterator::__construct() must implement interface
RecursiveIterator, instance of DirectoryIterator given....
--
Edit bug report at http://bugs.php.net/?id=39090&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39090&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39090&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39090&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39090&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39090&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39090&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39090&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39090&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39090&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39090&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39090&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39090&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39090&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39090&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39090&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39090&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39090&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39090&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39090&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39090&r=mysqlcfg