Adding test and fix to ensure the debug = 0, log = false leaves error_reporting set to 0.

Fixes #89
This commit is contained in:
Mark Story 2009-12-11 00:46:13 -05:00
parent f26d5efd0c
commit 904b9f5f1c
2 changed files with 6 additions and 1 deletions

View file

@ -109,7 +109,7 @@ class Configure extends Object {
}
}
if (isset($config['debug'])) {
if (isset($config['debug']) || isset($config['log'])) {
$reporting = 0;
if ($_this->debug) {
if (!class_exists('Debugger')) {

View file

@ -176,6 +176,11 @@ class ConfigureTest extends CakeTestCase {
Configure::write('debug', 2);
$this->assertEqual(ini_get('error_reporting'), E_ALL & ~E_DEPRECATED);
$this->assertEqual(ini_get('display_errors'), 1);
Configure::write('debug', 0);
Configure::write('log', false);
$this->assertEqual(ini_get('error_reporting'), 0);
$this->assertEqual(ini_get('display_errors'), 0);
}
/**