This commit is contained in:
2020-09-05 02:21:34 +08:00
parent 434d9a46e3
commit e596942974
+1 -1
View File
@@ -62,7 +62,7 @@ class Command extends Component
if (empty($this->sql)) { if (empty($this->sql)) {
return; return;
} }
if (($connect = $this->getConnection()) === false) { if (!(($connect = $this->getConnection()) instanceof PDO)) {
throw new Exception('数据库繁忙, 请稍后再试!'); throw new Exception('数据库繁忙, 请稍后再试!');
} }
$this->prepare = $connect->prepare($this->sql); $this->prepare = $connect->prepare($this->sql);