diff options
-rw-r--r-- | modules/ExceptionHandler.php | 3 | ||||
-rw-r--r-- | modules/FrontController.php | 4 | ||||
-rw-r--r-- | modules/Log/Exception.php | 1 | ||||
-rw-r--r-- | modules/LogStats.php | 13 | ||||
-rw-r--r-- | piwik.php | 12 |
5 files changed, 25 insertions, 8 deletions
diff --git a/modules/ExceptionHandler.php b/modules/ExceptionHandler.php index 593a16dbef..13e1e013cb 100644 --- a/modules/ExceptionHandler.php +++ b/modules/ExceptionHandler.php @@ -8,7 +8,8 @@ *
* @package Piwik_Helper
*/
-
+ +require_once "modules/Piwik.php";
/** *
*
diff --git a/modules/FrontController.php b/modules/FrontController.php index 8e1ae0af63..deafc0ebd2 100644 --- a/modules/FrontController.php +++ b/modules/FrontController.php @@ -13,8 +13,8 @@ /** * Zend classes */ -include "Zend/Exception.php"; -include "Zend/Loader.php"; +require_once "Zend/Exception.php"; +require_once "Zend/Loader.php"; require_once "Zend/Debug.php"; require_once "Zend/Auth.php"; require_once "Zend/Auth/Adapter/DbTable.php"; diff --git a/modules/Log/Exception.php b/modules/Log/Exception.php index c65484cd0e..84c3a42b55 100644 --- a/modules/Log/Exception.php +++ b/modules/Log/Exception.php @@ -9,6 +9,7 @@ * @package Piwik_Log
* @subpackage Piwik_Log_Exception
*/
+require_once "Log.php"; /** * Class used to log an exception event. diff --git a/modules/LogStats.php b/modules/LogStats.php index bc167b37f6..1e1e91623f 100644 --- a/modules/LogStats.php +++ b/modules/LogStats.php @@ -84,11 +84,14 @@ class Piwik_LogStats private function initProcess() { - $pluginsLogStats = Piwik_LogStats_Config::getInstance()->Plugins_LogStats; - if(is_array($pluginsLogStats) - && count($pluginsLogStats) != 0) - { - Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsLogStats['Plugins_LogStats'] ); + try{ + $pluginsLogStats = Piwik_LogStats_Config::getInstance()->Plugins_LogStats; + if(is_array($pluginsLogStats) + && count($pluginsLogStats) != 0) + { + Piwik_PluginsManager::getInstance()->setPluginsToLoad( $pluginsLogStats['Plugins_LogStats'] ); + } + } catch(Exception $e) { } $saveStats = Piwik_LogStats_Config::getInstance()->LogStats['record_statistics']; @@ -51,6 +51,18 @@ require_once "LogStats/Visit.php"; $GLOBALS['DEBUGPIWIK'] = false; + +if($GLOBALS['DEBUGPIWIK'] === true) +{ + date_default_timezone_set(date_default_timezone_get()); + /** + * Error / exception handling functions + */ + require_once PIWIK_INCLUDE_PATH . "/modules/ErrorHandler.php"; + require_once PIWIK_INCLUDE_PATH . "/modules/ExceptionHandler.php"; + set_error_handler('Piwik_ErrorHandler'); + set_exception_handler('Piwik_ExceptionHandler'); +} ob_start(); printDebug($_GET); $process = new Piwik_LogStats; |