From a11834efbb2f4ef8a9f6b34325ff43b3bf136df5 Mon Sep 17 00:00:00 2001 From: mattpiwik Date: Fri, 23 Mar 2012 03:39:35 +0000 Subject: 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 --- piwik.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'piwik.php') 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) { -- cgit v1.2.3