Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBenaka <diosmosis@users.noreply.github.com>2015-10-29 15:32:04 +0300
committerBenaka <diosmosis@users.noreply.github.com>2015-10-29 15:32:04 +0300
commit2de7fef4d2176dc435a7dd9c1932b7cf6fdcf77c (patch)
treef39117dd6ca6de940d3dfb043ca11b951285e8a5 /core
parentd1c8d8cc249d52992ca5a3df4a28bf7fefd03e96 (diff)
parentb4fb9d3fbbcb680cebf090f184db8862086e882c (diff)
Merge pull request #9119 from piwik/frontcontroller_tweak
Use of static local variable in FrontController hinders ability to test
Diffstat (limited to 'core')
-rw-r--r--core/FrontController.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 4b47d9024b..e276ed53e7 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -66,6 +66,11 @@ class FrontController extends Singleton
public static $enableDispatch = true;
/**
+ * @var bool
+ */
+ private $initialized = false;
+
+ /**
* Executes the requested plugin controller method.
*
* @throws Exception|\Piwik\PluginDeactivatedException in case the plugin doesn't exist, the action doesn't exist,
@@ -197,11 +202,11 @@ class FrontController extends Singleton
*/
public function init()
{
- static $initialized = false;
- if ($initialized) {
+ if ($this->initialized) {
return;
}
- $initialized = true;
+
+ $this->initialized = true;
$tmpPath = StaticContainer::get('path.tmp');