mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正几处Notice错误
This commit is contained in:
@@ -303,7 +303,7 @@ class App
|
||||
// 路由检测
|
||||
if (!empty($config['url_route_on'])) {
|
||||
// 开启路由 则检测路由配置
|
||||
Route::register($config['route']);
|
||||
Route::register(!empty($config['route'])?$config['route']:null);
|
||||
$result = Route::check($path_info, $depr);
|
||||
if (false === $result) {
|
||||
// 路由无效
|
||||
|
||||
@@ -1148,7 +1148,7 @@ abstract class Driver
|
||||
*/
|
||||
protected function debug($start)
|
||||
{
|
||||
if ($this->config['debug']) {
|
||||
if (!empty($this->config['debug'])) {
|
||||
// 开启数据库调试模式
|
||||
if ($start) {
|
||||
Debug::remark('queryStartTime', 'time');
|
||||
|
||||
@@ -70,7 +70,7 @@ class Mongo extends Driver
|
||||
|
||||
$host = 'mongodb://' . ($config['username'] ? "{$config['username']}" : '') . ($config['password'] ? ":{$config['password']}@" : '') . $config['hostname'] . ($config['hostport'] ? ":{$config['hostport']}" : '') . '/' . ($config['database'] ? "{$config['database']}" : '');
|
||||
try {
|
||||
$this->linkID[$linkNum] = new \mongoClient($host, $this->config['params']);
|
||||
$this->linkID[$linkNum] = new \mongoClient($host, !empty($this->config['params'])?$this->config['params']:array());
|
||||
} catch (\MongoConnectionException $e) {
|
||||
throw new Exception($e->getmessage());
|
||||
}
|
||||
@@ -105,7 +105,7 @@ class Mongo extends Driver
|
||||
$this->_mongo = $this->_linkID->selectDb($db);
|
||||
}
|
||||
// 当前MongoCollection对象
|
||||
if ($this->config['debug']) {
|
||||
if (!empty($this->config['debug'])) {
|
||||
$this->queryStr = $this->_dbName . '.getCollection(' . $collection . ')';
|
||||
}
|
||||
if ($this->_collectionName != $collection) {
|
||||
@@ -519,7 +519,7 @@ class Mongo extends Driver
|
||||
$this->model = $options['model'];
|
||||
$this->queryTimes++;
|
||||
$query = $this->parseWhere($options['where']);
|
||||
if ($this->config['debug']) {
|
||||
if (!empty($this->config['debug'])) {
|
||||
$this->queryStr = $this->_dbName . '.' . $this->_collectionName;
|
||||
$this->queryStr .= $query ? '.find(' . json_encode($query) . ')' : '';
|
||||
$this->queryStr .= '.count()';
|
||||
|
||||
Reference in New Issue
Block a user