From 8d08655670c27265d1c7727a5d40f594c2a1e03e Mon Sep 17 00:00:00 2001 From: yunwuxin <448901948@qq.com> Date: Tue, 14 Jun 2016 17:26:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=9A=84=E4=B8=80=E5=A4=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tpl/think_exception.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl index 2262fb91..5d397284 100644 --- a/tpl/think_exception.tpl +++ b/tpl/think_exception.tpl @@ -286,8 +286,10 @@ echo htmlentities(json_encode($val, JSON_PRETTY_PRINT)); } else if(is_bool($val)) { echo $val ? 'true' : 'false'; - } else { + } else if(is_scalar($val)) { echo htmlentities($val); + } else { + echo 'Resource'; } ?> From 3845e5d77f29e2059e43a87f736778a9b4c7f449 Mon Sep 17 00:00:00 2001 From: yunwuxin <448901948@qq.com> Date: Tue, 14 Jun 2016 17:28:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=9A=84=E4=B8=80=E5=A4=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tpl/think_exception.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl index 5d397284..4e46f6ee 100644 --- a/tpl/think_exception.tpl +++ b/tpl/think_exception.tpl @@ -253,8 +253,10 @@ echo htmlentities(json_encode($val, JSON_PRETTY_PRINT)); } else if(is_bool($val)) { echo $val ? 'true' : 'false'; - } else { + } else if(is_scalar($val)) { echo htmlentities($val); + } else { + echo 'Resource'; } ?>