From 2e9a262f59e2ae86a1d596cbaa0646af0ef4d9b5 Mon Sep 17 00:00:00 2001 From: mattab <matthieu.aubry@gmail.com> Date: Mon, 15 Dec 2014 15:57:18 +1300 Subject: [PATCH] Proper fix --- core/Tracker.php | 7 ++++++- piwik.php | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/Tracker.php b/core/Tracker.php index cb7b4494c5..fae00a57ef 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -62,7 +62,12 @@ class Tracker public static function loadTrackerEnvironment() { SettingsServer::setIsTrackerApiRequest(); - $GLOBALS['PIWIK_TRACKER_DEBUG'] = (bool) TrackerConfig::getConfigValue('debug'); + try { + $debug = (bool)TrackerConfig::getConfigValue('debug'); + } catch(Exception $e) { + $debug = false; + } + $GLOBALS['PIWIK_TRACKER_DEBUG'] = $debug; PluginManager::getInstance()->loadTrackerPlugins(); } diff --git a/piwik.php b/piwik.php index edce11447e..cd58b3d526 100644 --- a/piwik.php +++ b/piwik.php @@ -70,11 +70,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Cookie.php'; session_cache_limiter('nocache'); @date_default_timezone_set('UTC'); -try { - Tracker::loadTrackerEnvironment(); -} catch (Exception $e) { - // eg. Piwik is not installed yet -} +Tracker::loadTrackerEnvironment(); $tracker = new Tracker(); $requestSet = new RequestSet(); -- GitLab