diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-08-08 16:54:23 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-08-08 16:54:23 +0200 |
commit | cccd54dde8d2f7733fb44ae6e47f4ec81fa96056 (patch) | |
tree | 6527d19f95e14bf389adb6dad9ce9e4836d6ffcc /phpBB/phpbb/notification/type/base.php | |
parent | 80788980aa7dd4b3a849a43a94569a8b415d96db (diff) | |
download | forums-cccd54dde8d2f7733fb44ae6e47f4ec81fa96056.tar forums-cccd54dde8d2f7733fb44ae6e47f4ec81fa96056.tar.gz forums-cccd54dde8d2f7733fb44ae6e47f4ec81fa96056.tar.bz2 forums-cccd54dde8d2f7733fb44ae6e47f4ec81fa96056.tar.xz forums-cccd54dde8d2f7733fb44ae6e47f4ec81fa96056.zip |
[ticket/12742] Add check for empty $users and add method to fitting methods
The method might now return an empty array in case of an empty users array,
too. The notification types then check if the returned array is empty and
return this if it is empty and if the notification types would otherwise
carry out other operations afterwards.
PHPBB3-12742
Diffstat (limited to 'phpBB/phpbb/notification/type/base.php')
-rw-r--r-- | phpBB/phpbb/notification/type/base.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php index 8243a2e6a2..18204aaa03 100644 --- a/phpBB/phpbb/notification/type/base.php +++ b/phpBB/phpbb/notification/type/base.php @@ -544,6 +544,11 @@ abstract class base implements \phpbb\notification\type\type_interface */ protected function get_authenticated_recipients($users, $forum_id, $options) { + if (empty($users)) + { + return array(); + } + $users = array_unique($users); sort($users); |