From 3e9629420c3f8e574e7ab6a703d94b032db132a3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 18 Sep 2017 13:47:12 -0700 Subject: [PATCH] Issue #2779 - Statistics logging plugin throws fatal error --- e107_plugins/log/consolidate.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e107_plugins/log/consolidate.php b/e107_plugins/log/consolidate.php index 11e3c8aac..05082b4d2 100644 --- a/e107_plugins/log/consolidate.php +++ b/e107_plugins/log/consolidate.php @@ -163,8 +163,15 @@ class logConsolidate if (!isset($$varname)) $$varname = array(); // Create monthly arrays if they don't exist } - require($this->pathtologs.$this->pfileprev); // Yesterday's page accesses - $pageInfo array - require($this->pathtologs.$this->ifileprev); // Yesterdays browser accesses etc + if(file_exists($this->pathtologs.$this->pfileprev)) + { + require($this->pathtologs.$this->pfileprev); // Yesterday's page accesses - $pageInfo array + } + + if(file_exists($this->pathtologs.$this->ifileprev)) + { + require($this->pathtologs.$this->ifileprev); // Yesterdays browser accesses etc + } foreach($browserInfo as $name => $amount) {