改进exception_handle配置参数对闭包的支持

This commit is contained in:
thinkphp
2017-09-19 11:28:31 +08:00
parent 9681362895
commit 8aeb20dcd4

View File

@@ -106,7 +106,7 @@ class Error
if (!$handle) {
// 异常处理handle
$class = Config::get('exception_handle');
if ($class && class_exists($class) && is_subclass_of($class, "\\think\\exception\\Handle")) {
if ($class && is_string($class) && class_exists($class) && is_subclass_of($class, "\\think\\exception\\Handle")) {
$handle = new $class;
} else {
$handle = new Handle;