From eff2006e4efce7fec346aa3d3da03583da3854b6 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 23 Jan 2004 22:33:45 +0000 Subject: [PATCH] Fix this example --- ext/spl/examples/findfile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/spl/examples/findfile.php b/ext/spl/examples/findfile.php index 5cdd0dc893..68c0e0dd65 100755 --- a/ext/spl/examples/findfile.php +++ b/ext/spl/examples/findfile.php @@ -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 -- 2.50.1