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:
authormattpiwik <matthieu.aubry@gmail.com>2009-02-11 04:11:12 +0300
committermattpiwik <matthieu.aubry@gmail.com>2009-02-11 04:11:12 +0300
commit76f3e94ca9b4a2332d68cfb1382ba10c11fc4e30 (patch)
tree5c1c8d2ccdb5392567f23318de29925719c14e1e /index.php
parent6310b1c952299ac2874f561794cb55ebe179f36c (diff)
- fix #525 (Calling set_error_handler and set_exception_handler as part of the API makes it difficult to use)
you can now disable piwik error handler and exception handler by doing: define('ENABLE_ERROR_HANDLER', false); git-svn-id: http://dev.piwik.org/svn/trunk@890 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/index.php b/index.php
index d2006eec2d..2f089d0a81 100755
--- a/index.php
+++ b/index.php
@@ -28,16 +28,14 @@ require_once "core/testMinimumPhpVersion.php";
// NOTE: the code above this comment must be PHP4 compatible
date_default_timezone_set(date_default_timezone_get());
-if(!defined('ENABLE_DISPATCH'))
+if(!defined('ENABLE_ERROR_HANDLER') || ENABLE_ERROR_HANDLER)
{
- define('ENABLE_DISPATCH', true);
+ require_once "core/ErrorHandler.php";
+ require_once "core/ExceptionHandler.php";
+ set_error_handler('Piwik_ErrorHandler');
+ set_exception_handler('Piwik_ExceptionHandler');
}
-require_once "core/ErrorHandler.php";
-require_once "core/ExceptionHandler.php";
-set_error_handler('Piwik_ErrorHandler');
-set_exception_handler('Piwik_ExceptionHandler');
-
if(strlen(session_id()) === 0)
{
session_start();
@@ -45,7 +43,7 @@ if(strlen(session_id()) === 0)
require_once "FrontController.php";
-if(ENABLE_DISPATCH)
+if(!defined('ENABLE_DISPATCH') || ENABLE_DISPATCH)
{
$controller = Piwik_FrontController::getInstance();
$controller->init();