diff options
author | Matt Friedman <maf675@gmail.com> | 2016-01-28 07:04:55 -0800 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2016-01-28 07:04:55 -0800 |
commit | fb1acb0ef463bc38421248497e7f0b7b271600f7 (patch) | |
tree | d87a9c0bb413d0d1158b8bdfd4e1144b4244b05a /phpBB/phpbb | |
parent | fc72862ca4bb5c9f9b23867173543efb899de4db (diff) | |
download | forums-fb1acb0ef463bc38421248497e7f0b7b271600f7.tar forums-fb1acb0ef463bc38421248497e7f0b7b271600f7.tar.gz forums-fb1acb0ef463bc38421248497e7f0b7b271600f7.tar.bz2 forums-fb1acb0ef463bc38421248497e7f0b7b271600f7.tar.xz forums-fb1acb0ef463bc38421248497e7f0b7b271600f7.zip |
[ticket/14434] Check migrations in the database updater task
PHPBB3-14434
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/install/module/update_database/task/update.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/phpbb/install/module/update_database/task/update.php b/phpBB/phpbb/install/module/update_database/task/update.php index 84ec6f73f5..eb9bdc8138 100644 --- a/phpBB/phpbb/install/module/update_database/task/update.php +++ b/phpBB/phpbb/install/module/update_database/task/update.php @@ -139,6 +139,15 @@ class update extends task_base ->extension_directory('/migrations') ->get_classes(); + // Unset classes that are not a valid migration + foreach ($migrations as $key => $migration_class) + { + if (\phpbb\db\migrator::is_migration($migration_class) === false) + { + unset($migrations[$key]); + } + } + $this->migrator->set_migrations($migrations); $migration_count = count($migrations); $this->iohandler->set_task_count($migration_count, true); |