Skip to content

Commit

Permalink
Add missing check.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 9, 2009
1 parent ffe5725 commit 820079d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions File/Iterator/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,19 @@ public static function getFileIterator($paths, $suffixes = '', $prefixes = '', a
}

if (is_string($prefixes)) {
$prefixes = array($prefixes);
if ($prefixes != '') {
$prefixes = array($prefixes);
} else {
$prefixes = array();
}
}

if (is_string($suffixes)) {
$suffixes = array($suffixes);
if ($suffixes != '') {
$suffixes = array($suffixes);
} else {
$suffixes = array();
}
}

$pathIterator = new AppendIterator;
Expand Down

0 comments on commit 820079d

Please sign in to comment.