diff options
author | David King <imkingdavid@gmail.com> | 2015-05-23 19:57:32 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2015-05-23 19:57:32 -0400 |
commit | 9e6f9c8a64d89f48d531c5b24d535025dd04f956 (patch) | |
tree | d1f72147a9449e4e839ca9359166d1f330cd9f3e /phpBB/phpbb/extension/base.php | |
parent | 715d365a5e776207e1dddac7e5ccc50aad5621f1 (diff) | |
download | forums-9e6f9c8a64d89f48d531c5b24d535025dd04f956.tar forums-9e6f9c8a64d89f48d531c5b24d535025dd04f956.tar.gz forums-9e6f9c8a64d89f48d531c5b24d535025dd04f956.tar.bz2 forums-9e6f9c8a64d89f48d531c5b24d535025dd04f956.tar.xz forums-9e6f9c8a64d89f48d531c5b24d535025dd04f956.zip |
[ticket/13733] Handle nonexistent classes as well
PHPBB3-13733
Diffstat (limited to 'phpBB/phpbb/extension/base.php')
-rw-r--r-- | phpBB/phpbb/extension/base.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php index 4bf19b37ed..8b4d747eaf 100644 --- a/phpBB/phpbb/extension/base.php +++ b/phpBB/phpbb/extension/base.php @@ -139,8 +139,9 @@ class base implements \phpbb\extension\extension_interface foreach ($migrations as $key => $migration) { - $reflector = new \ReflectionClass($migration); - if (!$reflector->isSubclassOf('\phpbb\db\migration\migration')) { + // If the class doesn't exist OR the class does not extend the migration class + // we need to skip it. + if (!class_exists($migration) || ($reflector = new \ReflectionClass($migration) && !$reflector->isSubclassOf('\phpbb\db\migration\migration'))) { unset($migrations[$key]); } } |