[feature/migrations] Make sure the path sent to load_migrations is a directory

Prevent a lot++ of errors

PHPBB3-9737
This commit is contained in:
Nathan Guse 2013-01-09 16:56:26 -06:00
parent 445667a62e
commit 5f9e1f1e89

View file

@ -139,6 +139,11 @@ class phpbb_db_migrator
*/
public function load_migrations($path, $check_fulfillable = true)
{
if (!is_dir($path))
{
throw new phpbb_db_migration_exception('DIRECTORY INVALID', $path);
}
$handle = opendir($path);
while (($file = readdir($handle)) !== false)
{