From d6f8767416601904497da616a9aeadde6967dd22 Mon Sep 17 00:00:00 2001 From: huangdijia Date: Thu, 24 Dec 2015 08:40:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3mongo=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E4=B8=80=E5=A4=84Notice=20=E4=BF=AE=E6=AD=A3response::redirect?= =?UTF-8?q?()=E4=B8=80=E5=A4=84=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/driver/mongo.php | 2 +- library/think/response.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/db/driver/mongo.php b/library/think/db/driver/mongo.php index 1cc52cc0..ee32ed5c 100644 --- a/library/think/db/driver/mongo.php +++ b/library/think/db/driver/mongo.php @@ -310,7 +310,7 @@ class Mongo extends Driver $this->model = $options['model']; $query = $this->parseWhere($options['where']); $set = $this->parseSet($data); - if ($this->config['debug']) { + if (!empty($this->config['debug'])) { $this->queryStr = $this->_dbName . '.' . $this->_collectionName . '.update('; $this->queryStr .= $query ? json_encode($query) : '{}'; $this->queryStr .= ',' . json_encode($set) . ')'; diff --git a/library/think/response.php b/library/think/response.php index 173ec782..e03acf28 100644 --- a/library/think/response.php +++ b/library/think/response.php @@ -214,7 +214,7 @@ class Response $http_response_code = $params; $params = []; } - $url = preg_match('/^(https?:|\/)/', $s) ? $url : Url::build($url, $params); + $url = preg_match('/^(https?:|\/)/', $url) ? $url : Url::build($url, $params); header('Location: ' . $url, true, $http_response_code); }