Check if group is set

The actual value is possible to be null,
thus leading to PHP notice without the check.

For PHP7.4
This commit is contained in:
Tsvetan Koshutanski 2021-04-02 00:48:36 +03:00 committed by Fedor A. Fetisov
parent 6e3720f8e4
commit 003f98b18c

View File

@ -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'];
}