diff options
author | Eric Roberts <eric@cryode.com> | 2012-07-11 10:43:36 +0200 |
---|---|---|
committer | Eric Roberts <eric@cryode.com> | 2012-07-11 10:43:36 +0200 |
commit | fa337081ced1b1d34805d28f8307f069edf16cdf (patch) | |
tree | 63e524a282d7a8efef45b205c42f9b8e4a06b89b /index.php | |
parent | 6bf1e50bdff62d4842cd5a94d324e0768c5ace3e (diff) | |
parent | 78e5fdfe4399975b75b8697f64e270b1799ee2f1 (diff) |
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -52,20 +52,22 @@ * By default development will show errors but testing and live will hide them. */ -if (defined('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': + error_reporting(-1); + 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; + + default: + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); + exit('The application environment is not set correctly.'); } /* @@ -268,4 +270,4 @@ if (defined('ENVIRONMENT')) require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ -/* Location: ./index.php */
\ No newline at end of file +/* Location: ./index.php */ |