mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/13733] Handle nonexistent classes as well
PHPBB3-13733
This commit is contained in:
parent
715d365a5e
commit
9e6f9c8a64
1 changed files with 3 additions and 2 deletions
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue