Skip to content

Commit 2a6d638

Browse files
authored
remove exceptions property when debug is false (#133)
1 parent 3bfdc71 commit 2a6d638

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

plugins/exception-render/src/MixerApiExceptionRenderer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ private function debugViewVars($exception, array $viewVars): array
137137
{
138138
if (!Configure::read('debug')) {
139139
unset($viewVars['error']);
140+
unset($viewVars['exceptions']);
140141

141142
return $viewVars;
142143
}

plugins/exception-render/tests/TestCase/ControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ public function test_validation_exception_with_cakephp_debug_off(): void
8181

8282
$this->assertFalse(isset($object->trace));
8383
$this->assertFalse(isset($object->error));
84+
$this->assertFalse(isset($object->exceptions));
8485
}
8586
}

0 commit comments

Comments
 (0)