File tree Expand file tree Collapse file tree
plugins/exception-render/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,21 +117,24 @@ public function getError(): Throwable
117117 */
118118 private function debugViewVars ($ exception , array $ viewVars ): array
119119 {
120- if (!Configure::read ('debug ' ) || ! $ exception instanceof CakeException ) {
120+ if (!Configure::read ('debug ' )) {
121121 return $ viewVars ;
122122 }
123123
124- $ trace = (array )Debugger::formatTrace ($ exception ->getTrace (), [
125- 'format ' => 'array ' ,
126- 'args ' => false ,
127- ]);
124+ $ trace = (array )Debugger::formatTrace (
125+ $ exception ->getTrace (),
126+ [
127+ 'format ' => 'array ' ,
128+ 'args ' => false ,
129+ ]
130+ );
128131
129132 $ origin = [
130133 'file ' => $ exception ->getFile () ?: 'null ' ,
131134 'line ' => $ exception ->getLine () ?: 'null ' ,
132135 ];
133136
134- // Traces don't include the origin file/line.
137+ // traces don't include the origin file/line.
135138 array_unshift ($ trace , $ origin );
136139 $ viewVars ['trace ' ] = $ trace ;
137140 $ viewVars += $ origin ;
You can’t perform that action at this time.
0 commit comments