Skip to content

Commit 320aff7

Browse files
Nicolas D'Amourssebastianbergmann
authored andcommitted
[FEATURE] #82
Added check to make sure $files isn't false when sorting the array. Otherwise, we return an empty array.
1 parent b5e7830 commit 320aff7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Factory.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,12 @@ private function globstar(string $pattern) {
133133
}
134134
}
135135

136-
$files = array_unique($files);
137-
sort($files);
136+
if($files !== false) {
137+
$files = array_unique($files);
138+
sort($files);
139+
return $files;
140+
}
138141

139-
return $files;
142+
return [];
140143
}
141144
}

0 commit comments

Comments
 (0)