[Finder] Only use GLOB_BRACE when available

This commit is contained in:
Diego Saint Esteben 2015-04-29 09:34:37 -03:00 committed by Fabien Potencier
parent 1439da4c30
commit 7632d2787e
1 changed files with 1 additions and 1 deletions

View File

@ -671,7 +671,7 @@ class Finder implements \IteratorAggregate, \Countable
foreach ((array) $dirs as $dir) {
if (is_dir($dir)) {
$resolvedDirs[] = $dir;
} elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) {
} elseif ($glob = glob($dir, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) {
$resolvedDirs = array_merge($resolvedDirs, $glob);
} else {
throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));