Skip to content

Commit

Permalink
Ensure that Yaml::parse return an array as it can apparently return a…
Browse files Browse the repository at this point in the history
… string
  • Loading branch information
mikeSimonson committed Aug 9, 2015
1 parent e95b277 commit 1499f0c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ protected function doLoad($file)

$config = Yaml::parse(file_get_contents($file));

if (!is_array($config)) {
throw new \InvalidArgumentException('Not valid configuration.');
}

if (isset($config['migrations_directory'])) {
$config['migrations_directory'] = $this->getDirectoryRelativeToFile($file, $config['migrations_directory']);
}
Expand Down

0 comments on commit 1499f0c

Please sign in to comment.