We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6b2f8a2 + 1d33d46 commit d6f07aeCopy full SHA for d6f07ae
1 file changed
libs/Swoole/Controller.php
@@ -160,8 +160,10 @@ public function showTrace($detail=false)
160
{
161
$_trace['SESSION_ID'] = session_id();
162
}
163
- $_trace['读取数据库'] = $this->swoole->db->read_times . '次';
164
- $_trace['写入数据库'] = $this->swoole->db->write_times . '次';
+ if($this->swoole->db instanceof \Swoole\Database) {
+ $_trace['读取数据库'] = $this->swoole->db->read_times . '次';
165
+ $_trace['写入数据库'] = $this->swoole->db->write_times . '次';
166
+ }
167
$_trace['加载文件数目'] = count($included_files);
168
$_trace['PHP执行占用'] = $this->showTime();
169
$_trace = array_merge($this->trace,$_trace);
0 commit comments