mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding test and fix to ensure the debug = 0, log = false leaves error_reporting set to 0.
Fixes #89
This commit is contained in:
parent
f26d5efd0c
commit
904b9f5f1c
2 changed files with 6 additions and 1 deletions
|
@ -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')) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue