Skip to content

Commit

Permalink
Check if GLOB_BRACE is defined before using it. Fixes #2586
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk committed Jun 24, 2017
1 parent 261be1d commit 1319788
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Foundation/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ public function map(Router $router)
$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);
Expand Down

0 comments on commit 1319788

Please sign in to comment.