Skip to content

Commit

Permalink
Merge branch 'nogo-3.x' into 3.x
Browse files Browse the repository at this point in the history
Closes #1777
  • Loading branch information
akrabat committed Feb 24, 2016
2 parents 2597d9e + e5873ec commit d578da3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Slim/Handlers/PhpError.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ protected function renderHtmlError(Throwable $error)
*/
protected function renderJsonErrorMessage(Throwable $error)
{
$error = [
$json = [
'message' => 'Slim Application Error',
];

if ($this->displayErrorDetails) {
$error['error'] = [];
$json['error'] = [];

do {
$error['error'][] = [
$json['error'][] = [
'type' => get_class($error),
'code' => $error->getCode(),
'message' => $error->getMessage(),
Expand All @@ -243,7 +243,7 @@ protected function renderJsonErrorMessage(Throwable $error)
} while ($error = $error->getPrevious());
}

return json_encode($error, JSON_PRETTY_PRINT);
return json_encode($json, JSON_PRETTY_PRINT);
}

/**
Expand Down

0 comments on commit d578da3

Please sign in to comment.