This commit is contained in:
2021-08-18 15:10:41 +08:00
parent c2236528ab
commit 4052dd313a
+1 -1
View File
@@ -237,7 +237,7 @@ class PDO implements StopHeartbeatCheck
if ($prepare->execute($params) === false) { if ($prepare->execute($params) === false) {
throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE); throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE);
} }
if (!$isInsert) { if ($isInsert) {
return (int)$this->_pdo()->lastInsertId(); return (int)$this->_pdo()->lastInsertId();
} }
return 1; return 1;