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); }