From 48fa9d30e453993868ebdd4c75ed3643bc1f7041 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 6 Sep 2011 23:42:32 +1200 Subject: [PATCH] [AwlDatabase] Make attempt to nest transactions a fatal error. --- inc/AwlDatabase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/AwlDatabase.php b/inc/AwlDatabase.php index b2868f2..74b4295 100644 --- a/inc/AwlDatabase.php +++ b/inc/AwlDatabase.php @@ -104,7 +104,7 @@ class AwlDatabase extends AwlDBDialect { $this->txnstate = 1; } else { - trigger_error("Cannot begin a transaction while a transaction is already active.",E_USER_ERROR); + fatal("Cannot begin a transaction while a transaction is already active."); } return true; } @@ -140,6 +140,7 @@ class AwlDatabase extends AwlDBDialect { /** * Returns the current state of a transaction, indicating if we have begun a transaction, whether the transaction * has failed, or if we are not in a transaction. + * @return int 0 = not started, 1 = in progress, -1 = error pending rollback/commit */ function TransactionState() { return $this->txnstate; -- 2.11.4.GIT