Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupiter committed Sep 25, 2018
1 parent 77da60c commit 217b2cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Framework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function error($msg, $code = 500)
->write($msg);
}

if ($this->resolve('request')->getContentType() == 'application/json') {
if ($this->resolve('request')->getHeaderLine('Accept') == 'application/json') {
if ($code == 422 && !is_array($msg)) {
$msg = [$msg];
}
Expand Down

0 comments on commit 217b2cc

Please sign in to comment.