aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/notification
diff options
context:
space:
mode:
authormarkshawtoronto <mark.shaw@mail.utoronto.ca>2016-09-27 11:45:23 -0400
committermarkshawtoronto <mark.shaw@mail.utoronto.ca>2016-09-27 11:45:23 -0400
commit06c980f1ec61816846557e88832acd9b1c7644e5 (patch)
tree60b0cbb3f2571eed55747b9d0baf9d70085101c6 /phpBB/phpbb/notification
parent51d830a6d332b4e37d90ee4f8455a6b3a47f9591 (diff)
downloadforums-06c980f1ec61816846557e88832acd9b1c7644e5.tar
forums-06c980f1ec61816846557e88832acd9b1c7644e5.tar.gz
forums-06c980f1ec61816846557e88832acd9b1c7644e5.tar.bz2
forums-06c980f1ec61816846557e88832acd9b1c7644e5.tar.xz
forums-06c980f1ec61816846557e88832acd9b1c7644e5.zip
[ticket/14799] purge_notifications() should not leave open transactions.
When running purge_notifications(), if a notification type does not exist then a db transaction is started but never completed. On an error in get_notification_type_id(), end the transaction. PHPBB3-14799
Diffstat (limited to 'phpBB/phpbb/notification')
-rw-r--r--phpBB/phpbb/notification/manager.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index ecba8938f2..f5663f4b34 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -945,6 +945,7 @@ class manager
{
if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name]))
{
+ $this->db->sql_transaction('rollback');
throw new \phpbb\notification\exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name));
}