diff --git a/wire/core/WireDatabasePDO.php b/wire/core/WireDatabasePDO.php index 9089b80d..868360a5 100644 --- a/wire/core/WireDatabasePDO.php +++ b/wire/core/WireDatabasePDO.php @@ -818,6 +818,7 @@ class WireDatabasePDO extends Wire implements WireDatabase { * */ public function commit() { + if(!$this->inTransaction()) return false; $this->allowReader(true); return $this->pdoWriter()->commit(); } @@ -832,6 +833,7 @@ class WireDatabasePDO extends Wire implements WireDatabase { * */ public function rollBack() { + if(!$this->inTransaction()) return false; $this->allowReader(true); return $this->pdoWriter()->rollBack(); }