From 003f98b18c12c9b73cc5edf4da0300d663b384c8 Mon Sep 17 00:00:00 2001 From: Tsvetan Koshutanski Date: Fri, 2 Apr 2021 00:48:36 +0300 Subject: [PATCH] Check if group is set The actual value is possible to be null, thus leading to PHP notice without the check. For PHP7.4 --- src/mibew/libs/groups.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mibew/libs/groups.php b/src/mibew/libs/groups.php index 6e4e92db..bad5487f 100644 --- a/src/mibew/libs/groups.php +++ b/src/mibew/libs/groups.php @@ -202,6 +202,10 @@ function get_group_email($group_id) { // Try to get group email $group = group_by_id($group_id); + if (empty($group)) { + return ''; + } + if ($group && !empty($group['vcemail'])) { return $group['vcemail']; }