diff --git a/piwik.php b/piwik.php index a123987a26e..4563dddffe4 100644 --- a/piwik.php +++ b/piwik.php @@ -85,7 +85,7 @@ \Piwik\FrontController::createConfigObject(); -$GLOBALS['PIWIK_TRACKER_DEBUG'] = \Piwik\Config::getInstance()->Tracker['debug']; +$GLOBALS['PIWIK_TRACKER_DEBUG'] = (bool) \Piwik\Config::getInstance()->Tracker['debug']; if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) { require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php index 16449bb4cd5..139d528819c 100644 --- a/tests/PHPUnit/Core/ReleaseCheckListTest.php +++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php @@ -159,10 +159,10 @@ public function testPiwikTrackerDebugIsOff() $_GET = $oldGet; + $this->assertEquals(0, \Piwik\Config::getInstance()->Tracker['debug']); $this->assertTrue($GLOBALS['PIWIK_TRACKER_DEBUG'] === false); } - /** * This tests that all PHP files start with