Skip to content
Extraits de code Groupes Projets
Valider a11834ef rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Make sure that exceptions are caught in piwik.php or the webserver might...

Make sure that exceptions are caught in piwik.php or the webserver might return 500 error and this would fail the system check tests

git-svn-id: http://dev.piwik.org/svn/trunk@6103 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent a82e4ddf
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -461,6 +461,16 @@ if(!function_exists('printDebug')) ...@@ -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. * Displays exception in a friendly UI and exits.
* *
......
...@@ -75,7 +75,11 @@ if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) ...@@ -75,7 +75,11 @@ if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true)
if(!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) if(!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING)
{ {
$process = new Piwik_Tracker(); $process = new Piwik_Tracker();
$process->main(); try {
$process->main();
} catch(Exception $e) {
echo "Error:" . $e->getMessage();
}
ob_end_flush(); ob_end_flush();
if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) if($GLOBALS['PIWIK_TRACKER_DEBUG'] === true)
{ {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter