From 2839d9b31d88c755bd6fe4570bf1c402e026248d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 24 Jun 2016 17:40:36 +0800 Subject: [PATCH] =?UTF-8?q?Request=E7=B1=BBdispatch=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/think/Request.php b/library/think/Request.php index b6ef5c7f..a88c70c3 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1301,12 +1301,10 @@ class Request * @param array $params 参数 * @return array */ - public function dispatch($dispatch = null, $type = null, $params = []) + public function dispatch($dispatch = null, $type = 'module', $params = []) { if (!is_null($dispatch)) { - $this->dispatch = is_array($dispatch) ? - $dispatch : - ['type' => $type, $type => $dispatch, 'params' => $param]; + $this->dispatch = ['type' => $type, $type => $dispatch, 'params' => $param]; } return $this->dispatch; }