cvs: pear /File_Find Find.php

From: Date: Sat, 28 Dec 2002 13:45:24 +0000
Subject: cvs: pear /File_Find Find.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7976@lists.php.net to get a copy of this message
sterling Sat Dec 28 08:45:24 2002 EDT Modified files: /pear/File_Find Find.php Log: fix by Chandrashekhar Bhosle <cnb@php.net> to fix failures with certain directories. # Don't understand why this would be so, but I trust cnb, and it doesn't # look like it will do any harm. Index: pear/File_Find/Find.php diff -u pear/File_Find/Find.php:1.1 pear/File_Find/Find.php:1.2 --- pear/File_Find/Find.php:1.1 Thu Oct 24 17:31:57 2002 +++ pear/File_Find/Find.php Sat Dec 28 08:45:24 2002 @@ -16,7 +16,7 @@ // | Author: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Find.php,v 1.1 2002/10/24 21:31:57 tuupola Exp $ +// $Id: Find.php,v 1.2 2002/12/28 13:45:24 sterling Exp $ // require_once 'PEAR.php'; @@ -25,7 +25,7 @@ * Commonly needed functions searching directory trees * * @access public -* @version $Id: Find.php,v 1.1 2002/10/24 21:31:57 tuupola Exp $ +* @version $Id: Find.php,v 1.2 2002/12/28 13:45:24 sterling Exp $ * @package File * @author Sterling Hughes <sterling@php.net> */ @@ -78,7 +78,7 @@ $match_function = File_Find::_determineRegex($pattern, $pattern_type); $matches = array(); - while ($entry = @readdir ($dh)) { + while (false !== ($entry = @readdir ($dh))) { if ($match_function($pattern, $entry) && $entry != '.' && $entry != '..') { @@ -150,7 +150,7 @@ $directory .= DIRECTORY_SEPARATOR; $dh=opendir($directory); - while ($entry = readdir($dh)) { + while (false !=== ($entry = @readdir($dh))) { if ($entry != "." && $entry != "..") { array_push($retval, $entry); } @@ -246,7 +246,7 @@ return $pe; } - while ($entry = @readdir($dh)) { + while (false !== ($entry = @readdir($dh))) { if ($entry != '.' && $entry != '..') {

« previous php.pear.cvs (#7976) next »