From f31ea59a1afd4129dbe0599eb4aadcafa089fd2d Mon Sep 17 00:00:00 2001 From: rxu Date: Tue, 2 Jan 2024 01:33:13 +0700 Subject: [PATCH] [ticket/17117] Do not load non-existent/disabled notification methods Non-existent or disabled notification methods (f.e. added by extensions which were later disabled/purged) should not be loaded. PHPBB3-17117 --- phpBB/phpbb/notification/manager.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index 8bc2c04baa..05572c346b 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -411,12 +411,17 @@ class manager foreach ($methods as $method) { - // setup the notification methods and add the notification to the queue + // Do not load non-existent notification methods + if (!isset($this->notification_methods[$method])) + { + continue; + } + + // Setup the notification methods and add the notification to the queue if (!isset($notification_methods[$method])) { $notification_methods[$method] = $this->get_method_class($method); } - $notification_methods[$method]->add_to_queue($notification); } }