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:
-rw-r--r--core/Tracker.php10
-rw-r--r--piwik.php6
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.
*
diff --git a/piwik.php b/piwik.php
index c80f3517ea..654a95cd08 100644
--- a/piwik.php
+++ b/piwik.php
@@ -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)
{