diff options
| author | 2014-01-25 23:03:53 +0100 | |
|---|---|---|
| committer | 2014-01-25 23:03:53 +0100 | |
| commit | a46ee26e3592f8be95df9265e759796f3dc945eb (patch) | |
| tree | 80fbb678ca71e855c81a360a0b49feb2ac5b8183 /lib/Minz/Configuration.php | |
| parent | cfe273796d26946a87a7c0f8bc1422bcd7380a7a (diff) | |
Fallback config pour 0.7-beta
Diffstat (limited to 'lib/Minz/Configuration.php')
| -rw-r--r-- | lib/Minz/Configuration.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index a06ebe195..572b9984d 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -231,10 +231,16 @@ class Minz_Configuration { self::$environment = Minz_Configuration::PRODUCTION; break; default: - throw new Minz_BadConfigurationException ( - 'environment', - Minz_Exception::ERROR - ); + if ($general['environment'] >= 0 && + $general['environment'] <= 2) { + // fallback 0.7-beta + self::$environment = $general['environment']; + } else { + throw new Minz_BadConfigurationException ( + 'environment', + Minz_Exception::ERROR + ); + } } } |
