Skip to content

Commit a0c9d35

Browse files
dostenfabpot
authored andcommitted
[Finder] Only use GLOB_BRACE when available
1 parent f52b8a3 commit a0c9d35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Finder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ public function in($dirs)
671671
foreach ((array) $dirs as $dir) {
672672
if (is_dir($dir)) {
673673
$resolvedDirs[] = $dir;
674-
} elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) {
674+
} elseif ($glob = glob($dir, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
675675
$resolvedDirs = array_merge($resolvedDirs, $glob);
676676
} else {
677677
throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));

0 commit comments

Comments
 (0)