diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-01-09 16:56:26 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-01-09 16:56:26 -0600 |
commit | 5f9e1f1e89f8df5420fd82b5256a461de0f98604 (patch) | |
tree | aeec7dea55da7adc0438d44f48e69c30168c4f89 /phpBB/includes/db | |
parent | 445667a62e80c42b5406c981d1116ef99a23df3b (diff) | |
download | forums-5f9e1f1e89f8df5420fd82b5256a461de0f98604.tar forums-5f9e1f1e89f8df5420fd82b5256a461de0f98604.tar.gz forums-5f9e1f1e89f8df5420fd82b5256a461de0f98604.tar.bz2 forums-5f9e1f1e89f8df5420fd82b5256a461de0f98604.tar.xz forums-5f9e1f1e89f8df5420fd82b5256a461de0f98604.zip |
[feature/migrations] Make sure the path sent to load_migrations is a directory
Prevent a lot++ of errors
PHPBB3-9737
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/migrator.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/db/migrator.php b/phpBB/includes/db/migrator.php index 1042b767e8..359c34bf5d 100644 --- a/phpBB/includes/db/migrator.php +++ b/phpBB/includes/db/migrator.php @@ -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) { |