From 217b2cc966db1180b972ff8cb627bd72c15cec6d Mon Sep 17 00:00:00 2001 From: Jupiter Date: Tue, 25 Sep 2018 15:26:35 +0100 Subject: [PATCH] bug fix --- lib/Framework/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Framework/App.php b/lib/Framework/App.php index deb623d..9a5029b 100644 --- a/lib/Framework/App.php +++ b/lib/Framework/App.php @@ -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]; }