Check if GLOB_BRACE is defined before using it. Fixes #2586
This commit is contained in:
@@ -89,7 +89,10 @@ class RouteServiceProvider extends ServiceProvider
|
||||
$router->group(['namespace' => $this->namespace, 'as' => 'core::'], function (Router $router) {
|
||||
$path = app_path('Http/Routes');
|
||||
|
||||
foreach (glob("{$path}/*{,/*}.php", GLOB_BRACE) as $file) {
|
||||
$globBrace = defined('GLOB_BRACE') ? GLOB_BRACE : 0;
|
||||
$globFlag = $globBrace;
|
||||
|
||||
foreach (glob("{$path}/*{,/*}.php", $globFlag) as $file) {
|
||||
$class = substr($file, strlen($path));
|
||||
$class = str_replace('/', '\\', $class);
|
||||
$class = substr($class, 0, -4);
|
||||
|
||||
Reference in New Issue
Block a user