From 04f21380ca2304a2aa95f8dfcd76675b83d58437 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 17 Jan 2012 09:21:46 -0600 Subject: [PATCH] fix glob problem in migration resolver. --- laravel/cli/tasks/migrate/resolver.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/laravel/cli/tasks/migrate/resolver.php b/laravel/cli/tasks/migrate/resolver.php index b6bf5064..7b7d2537 100644 --- a/laravel/cli/tasks/migrate/resolver.php +++ b/laravel/cli/tasks/migrate/resolver.php @@ -140,6 +140,14 @@ protected function migrations($bundle) { $files = glob(Bundle::path($bundle).'migrations/*_*'.EXT); + // When open_basedir is enabled, glob will return false on an + // empty directory, so we will return an empty array in this + // case so the application doesn't bomb out. + if ($files === false) + { + return array(); + } + // Once we have the array of files in the migration directory, // we'll take the basename of the file and remove the PHP file // extension, which isn't needed.