aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-09-10 19:17:37 +0200
committerTristan Darricau <github@nicofuma.fr>2014-09-10 19:21:55 +0200
commitff872a79707200ed7e3e7c25b4ebc7f6f4313b6c (patch)
tree0fd38ebccfeba96c79320818df3a1fe0f1762f1b
parenta093c28d1adf18d10208f05fca18e2e653f03b80 (diff)
downloadforums-ff872a79707200ed7e3e7c25b4ebc7f6f4313b6c.tar
forums-ff872a79707200ed7e3e7c25b4ebc7f6f4313b6c.tar.gz
forums-ff872a79707200ed7e3e7c25b4ebc7f6f4313b6c.tar.bz2
forums-ff872a79707200ed7e3e7c25b4ebc7f6f4313b6c.tar.xz
forums-ff872a79707200ed7e3e7c25b4ebc7f6f4313b6c.zip
[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
-rw-r--r--phpBB/phpbb/extension/base.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index 288fb7d19c..e0ccb4c65b 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -35,6 +35,9 @@ class base implements \phpbb\extension\extension_interface
/** @var string */
protected $extension_path;
+ /** @var string[] */
+ private $migrations = false;
+
/**
* Constructor
*
@@ -122,11 +125,9 @@ class base implements \phpbb\extension\extension_interface
*/
protected function get_migration_file_list()
{
- static $migrations = false;
-
- if ($migrations !== false)
+ if ($this->migrations !== false)
{
- return $migrations;
+ return $this->migrations;
}
// Only have the finder search in this extension path directory