diff options
author | David King <imkingdavid@gmail.com> | 2015-05-23 17:06:25 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2015-05-23 17:06:25 -0400 |
commit | 715d365a5e776207e1dddac7e5ccc50aad5621f1 (patch) | |
tree | c83e9cb524af7e9a4cdecc7de041baa1fb7d3cab | |
parent | 633740719218b72bac45bbcdff64def8da483851 (diff) | |
download | forums-715d365a5e776207e1dddac7e5ccc50aad5621f1.tar forums-715d365a5e776207e1dddac7e5ccc50aad5621f1.tar.gz forums-715d365a5e776207e1dddac7e5ccc50aad5621f1.tar.bz2 forums-715d365a5e776207e1dddac7e5ccc50aad5621f1.tar.xz forums-715d365a5e776207e1dddac7e5ccc50aad5621f1.zip |
[ticket/13733] Only use migration classes that extension the base migration class.
PHPBB3-13733
-rw-r--r-- | phpBB/phpbb/extension/base.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php index 5bb530bad4..4bf19b37ed 100644 --- a/phpBB/phpbb/extension/base.php +++ b/phpBB/phpbb/extension/base.php @@ -137,6 +137,14 @@ class base implements \phpbb\extension\extension_interface $migrations = $this->extension_finder->get_classes_from_files($migrations); + foreach ($migrations as $key => $migration) + { + $reflector = new \ReflectionClass($migration); + if (!$reflector->isSubclassOf('\phpbb\db\migration\migration')) { + unset($migrations[$key]); + } + } + return $migrations; } } |