Skip to content

Commit

Permalink
fixed array_merge() error in Finder::list_files() if an error occurs …
Browse files Browse the repository at this point in the history
…in glob()
  • Loading branch information
ushi committed Apr 3, 2012
1 parent 21e869b commit 0959c5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/finder.php
Expand Up @@ -257,7 +257,10 @@ public function list_files($directory = null, $filter = '*.php')
$found = array();
foreach ($paths as $path)
{
$found = array_merge(glob($path.$directory.'/'.$filter), $found);
if (($f = glob($path.$directory.DS.$filter)) !== false)
{
$found = array_merge($f, $found);
}
}

return $found;
Expand Down

0 comments on commit 0959c5f

Please sign in to comment.