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