From 35ac46d4aad12fe723229feca403b4dee3efcc27 Mon Sep 17 00:00:00 2001 From: Root Date: Fri, 25 May 2012 18:51:48 -0400 Subject: Changed instead of turning off of the error messaging to hide them --- index.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 5a1190112..6ffe4864e 100644 --- a/index.php +++ b/index.php @@ -52,20 +52,23 @@ * By default development will show errors but testing and live will hide them. */ -if (defined('ENVIRONMENT')) +// By default show all except notifications, deprecated and strict errors +error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); + +// Show or hide errors depending on current environment +switch (ENVIRONMENT) { - switch (ENVIRONMENT) - { - case 'development': - error_reporting(-1); - break; - case 'testing': - case 'production': - error_reporting(0); - break; - default: - exit('The application environment is not set correctly.'); - } + case 'development': + ini_set('display_errors', 1); + break; + + case 'testing': + case 'production': + ini_set('display_errors', 0); + break; + + default: + exit('The application environment is not set correctly.'); } /* -- cgit v1.2.3-24-g4f1b From 3cc8502b48946f7298797393cea0a7183c325244 Mon Sep 17 00:00:00 2001 From: Root Date: Sun, 27 May 2012 20:06:10 -0400 Subject: Changed to show all the errors on dev --- index.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6ffe4864e..c212cac84 100644 --- a/index.php +++ b/index.php @@ -52,18 +52,16 @@ * By default development will show errors but testing and live will hide them. */ -// By default show all except notifications, deprecated and strict errors -error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); - -// Show or hide errors depending on current environment switch (ENVIRONMENT) { case 'development': + error_reporting(E_ALL); ini_set('display_errors', 1); break; case 'testing': case 'production': + error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); ini_set('display_errors', 0); break; -- cgit v1.2.3-24-g4f1b From 8d021e647f6a094b6097d1ea89119a4047efc8dd Mon Sep 17 00:00:00 2001 From: Gints Murans Date: Wed, 30 May 2012 21:15:08 +0300 Subject: E_ALL -> -1 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index c212cac84..a11c5c1f2 100644 --- a/index.php +++ b/index.php @@ -55,7 +55,7 @@ switch (ENVIRONMENT) { case 'development': - error_reporting(E_ALL); + error_reporting(-1); ini_set('display_errors', 1); break; -- cgit v1.2.3-24-g4f1b From cbb654d9b332b65c5e2ae6f7bf8936b425b709ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 10 Jul 2012 11:36:32 +0300 Subject: Follow-up to #1398, #1548 --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index c379f72d0..aa1df441b 100644 --- a/index.php +++ b/index.php @@ -66,6 +66,7 @@ switch (ENVIRONMENT) break; default: + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); exit('The application environment is not set correctly.'); } -- cgit v1.2.3-24-g4f1b