Skip to content

Commit

Permalink
Adding test and fix to ensure the debug = 0, log = false leaves error…
Browse files Browse the repository at this point in the history
…_reporting set to 0.

Fixes #89
  • Loading branch information
markstory committed Dec 11, 2009
1 parent f26d5ef commit 904b9f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/configure.php
Expand Up @@ -109,7 +109,7 @@ function write($config, $value = null) {
}
}

if (isset($config['debug'])) {
if (isset($config['debug']) || isset($config['log'])) {
$reporting = 0;
if ($_this->debug) {
if (!class_exists('Debugger')) {
Expand Down
5 changes: 5 additions & 0 deletions cake/tests/cases/libs/configure.test.php
Expand Up @@ -176,6 +176,11 @@ function testInteractionOfDebugAndLog() {
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);
}

/**
Expand Down

0 comments on commit 904b9f5

Please sign in to comment.