ID:               39090
 Updated by:       [EMAIL PROTECTED]
 Reported By:      judas dot iscariote at gmail dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         SPL related
 Operating System: *
 PHP Version:      5.2.0
 Assigned To:      helly
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[2006-10-31 23:29:33] [EMAIL PROTECTED]

Fixed in 6, will get fixed in 5.2.1.

------------------------------------------------------------------------

[2006-10-09 09:51:55] judas dot iscariote at gmail dot com

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 this bug report at http://bugs.php.net/?id=39090&edit=1

Reply via email to