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
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2018-05-24 20:19:36 +0300
committerGitHub <noreply@github.com>2018-05-24 20:19:36 +0300
commit8250cb21ffd8d2870def15392b6b83047cf147ee (patch)
tree0fd0bc1b707c2d694bad7d1a8971b01e8afa065a /plugins/Live
parentedb14e861f266a78fcc31c4324da7010dd129f36 (diff)
Fix for non-test mode where test DI entry should not be available. (#12984)
Diffstat (limited to 'plugins/Live')
-rw-r--r--plugins/Live/Model.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Live/Model.php b/plugins/Live/Model.php
index de2587c96e..81a8fe4e04 100644
--- a/plugins/Live/Model.php
+++ b/plugins/Live/Model.php
@@ -128,7 +128,13 @@ class Model
list($whereIdSites, $idSites) = $this->getIdSitesWhereClause($idSite, $from);
- $now = StaticContainer::get('Tests.now') ?: time();
+ $now = null;
+ try {
+ $now = StaticContainer::get('Tests.now');
+ } catch (\Exception $ex) {
+ // ignore
+ }
+ $now = $now ?: time();
$bind = $idSites;
$bind[] = Date::factory($now - $lastMinutes * 60)->toString('Y-m-d H:i:s');