|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39090 DirectoryFilterDots doxygen docs and example is wrong
Submitted: 2006-10-09 09:51 UTC Modified: 2006-11-03 19:05 UTC
From: judas dot iscariote at gmail dot com Assigned: helly (profile)
Status: Closed Package: SPL related
PHP Version: 5.2.0 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
4 + 26 = ?
Subscribe to this entry?

 [2006-10-09 09:51 UTC] judas dot iscariote at gmail dot com
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/

Reproduce code:

require_once dirname(__FILE__) . '/';

$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....


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-31 23:29 UTC]
Fixed in 6, will get fixed in 5.2.1.
 [2006-11-03 19:05 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 07:01:28 2024 UTC