mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-26 21:15:21 +02:00
[ticket/12963] Don't use static var in \extension\base\get_migration_file_list
The static var was global to all instance of \phpbb\base and so if two different instances (for two different extensions) were created by the same script they shared the same migrations list. PHPBB3-12963
This commit is contained in:
@ -35,6 +35,9 @@ class base implements \phpbb\extension\extension_interface
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
protected $extension_path;
|
protected $extension_path;
|
||||||
|
|
||||||
|
/** @var string[] */
|
||||||
|
private $migrations = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -122,11 +125,9 @@ class base implements \phpbb\extension\extension_interface
|
|||||||
*/
|
*/
|
||||||
protected function get_migration_file_list()
|
protected function get_migration_file_list()
|
||||||
{
|
{
|
||||||
static $migrations = false;
|
if ($this->migrations !== false)
|
||||||
|
|
||||||
if ($migrations !== false)
|
|
||||||
{
|
{
|
||||||
return $migrations;
|
return $this->migrations;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only have the finder search in this extension path directory
|
// Only have the finder search in this extension path directory
|
||||||
|
Reference in New Issue
Block a user