mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 16:54:44 +02:00
Fix issue processwire/processwire-issues#1894
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user