Permalink
Browse files

added a check on open_basedir in oil migration generation causing glo…

…b() to fail
  • Loading branch information...
WanWizard committed Jan 9, 2012
1 parent d169bd5 commit ec6d171273e812c0e904e7c4d56d01fddeb0e3be
Showing with 6 additions and 1 deletion.
  1. +6 −1 classes/generate.php
View
@@ -354,7 +354,12 @@ public static function migration($args, $build = true)
}
// Check if a migration with this name already exists
- if (count($duplicates = glob(APPPATH."migrations/*_{$migration_name}*")) > 0)
+ if (($duplicates = glob(APPPATH."migrations/*_{$migration_name}*")) === false)
+ {
+ throw new Exception("Unable to read existing migrations. Do you have an 'open_basedir' defined?");
+ }
+
+ if (count($duplicates) > 0)
{
// Don't override a file
if (\Cli::option('s', \Cli::option('skip')) === true)

0 comments on commit ec6d171

Please sign in to comment.