Skip to content

Commit

Permalink
chore: Update FileList.php to handle GLOB_BRACE constant and fallback…
Browse files Browse the repository at this point in the history
… to alternative method if not defined
  • Loading branch information
ewilan-riviere committed Aug 24, 2024
1 parent 8216acd commit 5776c04
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/FileList.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,11 @@ private function execute(): array
private function native(string $path, array &$results = []): array
{
if (defined('GLOB_BRACE')) {
dump('GLOB_BRACE');
$files = glob($path.'/{,.}*', GLOB_BRACE);
if (! $files) {
$files = [];
}
} else {
dump('GLOB_BRACE not defined');
$rii = $this->recursive ? new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)) : new \DirectoryIterator($path);
$files = [];

Expand Down

0 comments on commit 5776c04

Please sign in to comment.