mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[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
This commit is contained in:
parent
51d830a6d3
commit
06c980f1ec
1 changed files with 1 additions and 0 deletions
|
@ -945,6 +945,7 @@ class manager
|
||||||
{
|
{
|
||||||
if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name]))
|
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));
|
throw new \phpbb\notification\exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue