diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-07-12 12:51:11 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-07-12 12:51:11 +0200 |
commit | 6648da07a4dc001d5e9d2c16e501d563e7fa2118 (patch) | |
tree | 4b7f1a2a6da31111711291be1cc173ab35b619bf /index.php | |
parent | a44cf574132ae9332ab68ddbcda8849e3e71c54b (diff) | |
parent | 7ac09978c2fb2cae07f6998e245cda3aaa2e1230 (diff) |
Merge branch 'develop' of 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 */ |