@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $error = new ErrorException($errorMessage, $errorSeverity, $errorFile, $errorLine, $errorContext); |
| 134 | 134 | |
| 135 | 135 | // Logged the error |
| 136 | - if(services()->has('logger')) { |
|
| 136 | + if (services()->has('logger')) { |
|
| 137 | 137 | logger()->error( |
| 138 | 138 | implode( |
| 139 | 139 | ' ', |
@@ -284,21 +284,21 @@ discard block |
||
| 284 | 284 | ]; |
| 285 | 285 | |
| 286 | 286 | $this->statusCode = $code; |
| 287 | - $this->reasonPhrase = $error[ 'title' ]; |
|
| 287 | + $this->reasonPhrase = $error['title']; |
|
| 288 | 288 | |
| 289 | 289 | if (is_string($vars)) { |
| 290 | 290 | $vars = ['message' => $vars]; |
| 291 | - } elseif (is_array($vars) and empty($vars[ 'message' ])) { |
|
| 292 | - $vars[ 'message' ] = $error[ 'message' ]; |
|
| 291 | + } elseif (is_array($vars) and empty($vars['message'])) { |
|
| 292 | + $vars['message'] = $error['message']; |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | - if (isset($vars[ 'message' ])) { |
|
| 296 | - $error[ 'message' ] = $vars[ 'message' ]; |
|
| 295 | + if (isset($vars['message'])) { |
|
| 296 | + $error['message'] = $vars['message']; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | if (is_ajax() or $this->mimeType !== 'text/html') { |
| 300 | 300 | $this->statusCode = $code; |
| 301 | - $this->reasonPhrase = $error[ 'title' ]; |
|
| 301 | + $this->reasonPhrase = $error['title']; |
|
| 302 | 302 | $this->send($vars); |
| 303 | 303 | |
| 304 | 304 | exit(EXIT_ERROR); |