1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 16:54:44 +02:00
This commit is contained in:
Ryan Cramer
2024-03-28 10:30:36 -04:00
parent 68d9ec9b42
commit 718c93b056

View File

@@ -818,6 +818,7 @@ class WireDatabasePDO extends Wire implements WireDatabase {
* *
*/ */
public function commit() { public function commit() {
if(!$this->inTransaction()) return false;
$this->allowReader(true); $this->allowReader(true);
return $this->pdoWriter()->commit(); return $this->pdoWriter()->commit();
} }
@@ -832,6 +833,7 @@ class WireDatabasePDO extends Wire implements WireDatabase {
* *
*/ */
public function rollBack() { public function rollBack() {
if(!$this->inTransaction()) return false;
$this->allowReader(true); $this->allowReader(true);
return $this->pdoWriter()->rollBack(); return $this->pdoWriter()->rollBack();
} }