修正Response类

This commit is contained in:
thinkphp
2016-06-16 11:05:21 +08:00
parent e5740e5451
commit 1001f8c395

View File

@@ -48,7 +48,7 @@ class Response
* @param string $type 输出类型
* @param array $options 输出参数
*/
public function __construct($data = [], $type = '', $options = [])
public function __construct($data = '', $type = '', $options = [])
{
$this->data = $data;
$this->type = empty($type) ? 'null' : strtolower($type);
@@ -72,7 +72,7 @@ class Response
* @param array $options 输出参数
* @return Response
*/
public static function create($data = [], $type = '', $options = [])
public static function create($data = '', $type = '', $options = [])
{
$type = empty($type) ? 'null' : strtolower($type);