mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/13733] Only use migration classes that extension the base migration class.
PHPBB3-13733
This commit is contained in:
parent
6337407192
commit
715d365a5e
1 changed files with 8 additions and 0 deletions
|
@ -137,6 +137,14 @@ class base implements \phpbb\extension\extension_interface
|
||||||
|
|
||||||
$migrations = $this->extension_finder->get_classes_from_files($migrations);
|
$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;
|
return $migrations;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue