summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorRoot <development@fractureme.com>2012-05-26 00:51:48 +0200
committerRoot <development@fractureme.com>2012-05-26 00:52:43 +0200
commit35ac46d4aad12fe723229feca403b4dee3efcc27 (patch)
treec508e8b5111c28b343e9d915eb22f90174591009 /index.php
parent13a9bf472f548463682d4d3fafce146b9a9ced3c (diff)
Changed instead of turning off of the error messaging to hide them
Diffstat (limited to 'index.php')
-rw-r--r--index.php29
1 files changed, 16 insertions, 13 deletions
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.');
}
/*