From a988fbd797e1765397d614a38a695eac4d88e528 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 29 Dec 2015 18:59:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3response=E7=B1=BB=E7=9A=84typ?= =?UTF-8?q?e=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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/think/response.php b/library/think/response.php index 0db62100..ef8c8e2f 100644 --- a/library/think/response.php +++ b/library/think/response.php @@ -16,7 +16,7 @@ class Response // 输出数据的转换方法 protected static $tramsform = null; // 输出数据的类型 - protected static $type = 'html'; + protected static $type = ''; // 输出数据 protected static $data = ''; // 是否exit @@ -98,9 +98,8 @@ class Response public static function type($type = null) { if (is_null($type)) { - return self::$type; + return self::$type ?: Config::get('default_return_type'); } - self::$type = $type; } @@ -126,7 +125,6 @@ class Response if (is_null($exit)) { return self::$isExit; } - self::$isExit = (boolean) $exit; }