From 46ea48642a00c4c1594c85ce5e92c89293599a80 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 27 Mar 2018 13:34:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BResponse=E7=B1=BBcreate?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Response.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/think/Response.php b/library/think/Response.php index f14bbcfd..c5c15209 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -69,9 +69,7 @@ class Response */ public static function create($data = '', $type = '', $code = 200, array $header = [], $options = []) { - $type = empty($type) ? 'null' : strtolower($type); - - $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\' . ucfirst($type); + $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\' . ucfirst(strtolower($type)); if (class_exists($class)) { $response = new $class($data, $code, $header, $options); } else {