diff options
Diffstat (limited to 'lib/Minz/FrontController.php')
| -rw-r--r-- | lib/Minz/FrontController.php | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php index 066278b7c..e09b022fc 100644 --- a/lib/Minz/FrontController.php +++ b/lib/Minz/FrontController.php @@ -115,21 +115,26 @@ class Minz_FrontController { } private function setReporting() { - $conf = Minz_Configuration::get('system'); - switch($conf->environment) { - case 'production': - error_reporting(E_ALL); - ini_set('display_errors', 'Off'); - ini_set('log_errors', 'On'); - break; - case 'development': - error_reporting(E_ALL); - ini_set('display_errors', 'On'); - ini_set('log_errors', 'On'); - break; - case 'silent': - error_reporting(0); - break; + $envType = getenv('FRESHRSS_ENV'); + if ($envType == '') { + $conf = Minz_Configuration::get('system'); + $envType = $conf->environment; + } + switch ($envType) { + case 'development': + error_reporting(E_ALL); + ini_set('display_errors', 'On'); + ini_set('log_errors', 'On'); + break; + case 'silent': + error_reporting(0); + break; + case 'production': + default: + error_reporting(E_ALL); + ini_set('display_errors', 'Off'); + ini_set('log_errors', 'On'); + break; } } } |
