From 43ded023efe17872e5a98230efa83495a737ca35 Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Wed, 20 Jan 2021 09:41:32 -0800 Subject: [PATCH] Only use GLOB_BRACE when defined --- src/Iterator/GlobIterator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Iterator/GlobIterator.php b/src/Iterator/GlobIterator.php index e88bbeb..2ef80f8 100644 --- a/src/Iterator/GlobIterator.php +++ b/src/Iterator/GlobIterator.php @@ -52,7 +52,8 @@ public function __construct($glob, $flags = 0) // glob() does not support [^...] on Windows ('\\' !== DIRECTORY_SEPARATOR || false === strpos($glob, '[^')) ) { - $results = glob($glob, GLOB_BRACE); + // GLOB_BRACE is not available in some environments. + $results = glob($glob, defined('GLOB_BRACE') ? GLOB_BRACE : 0); // $results may be empty or false if $glob is invalid if (empty($results)) {