]> granicus.if.org Git - php/commitdiff
Fix this example
authorMarcus Boerger <helly@php.net>
Fri, 23 Jan 2004 22:33:45 +0000 (22:33 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 23 Jan 2004 22:33:45 +0000 (22:33 +0000)
ext/spl/examples/findfile.php

index 5cdd0dc89366d4c2242ff8ae821a914ad0a8c65e..68c0e0dd65f805b6454aee581bcfab059d589f7e 100755 (executable)
@@ -33,9 +33,9 @@ class FindFile extends FilterIterator
                parent::__construct(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)));
        }
        function accept() {
-               return !strcmp($this->it->current(), $this->file);
+               return !strcmp($this->current(), $this->file);
        }
 }
 
-foreach(new FindFile($argv[1], $argv[2]) as $pathname => $file) echo "$pathname\n";
+foreach(new FindFile($argv[1], $argv[2]) as $pathname => $file) echo $file->getPathname()."\n";
 ?>
\ No newline at end of file