diff options
-rw-r--r-- | core/Tracker.php | 10 | ||||
-rw-r--r-- | piwik.php | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/core/Tracker.php b/core/Tracker.php index c78cc34d8e..49ae6bc355 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -461,6 +461,16 @@ if(!function_exists('printDebug')) } } +// When the config file is not created, this function is called +// During install, the config file is not there and the "test piwik.php request" then fails +// On a test server, the php error returned status 500, which was mistakenly failing the "Tracker status" test in System Check +if(!function_exists('Piwik_TranslateException')) +{ + function Piwik_TranslateException($message, $args) + { + return $message; + } +} /** * Displays exception in a friendly UI and exits. * @@ -75,7 +75,11 @@ if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) if(!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) { $process = new Piwik_Tracker(); - $process->main(); + try { + $process->main(); + } catch(Exception $e) { + echo "Error:" . $e->getMessage(); + } ob_end_flush(); if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) { |