diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-03-20 14:11:35 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2023-03-20 14:11:35 +0000 |
| commit | cae6febc3efa76da31d581b4bc52e4afb494a254 (patch) | |
| tree | 0cbffaef0ee5aaa4fe2c522d9f98d8d3a52784dd /lib/messaging.inc.php | |
| parent | 8910f83ff312bf3e4756c23e43dfab32e607b3a5 (diff) | |
prevent php8 warnings, fixes #2401
Closes #2401
Merge request studip/studip!1594
Diffstat (limited to 'lib/messaging.inc.php')
| -rw-r--r-- | lib/messaging.inc.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/messaging.inc.php b/lib/messaging.inc.php index d0fe68e..b055c7f 100644 --- a/lib/messaging.inc.php +++ b/lib/messaging.inc.php @@ -186,6 +186,7 @@ class messaging $reply_to = $sender->Email; } $attachments = []; + $attachments_as_links = false; if ($GLOBALS['ENABLE_EMAIL_ATTACHMENTS'] && $msg->attachment_folder) { $attachments = $msg->attachment_folder->file_refs; $size_of_attachments = array_sum($attachments->pluck('size')) ?: 0; @@ -357,10 +358,16 @@ class messaging // diese user_id schreiben wir in ein tempraeres array foreach ($rec_id as $one) { $smsforward_rec = User::find($one)->smsforward_rec; - $tmp_forward_id = User::find($smsforward_rec)->user_id; - if ($tmp_forward_id) { - $rec_id[] = $tmp_forward_id; + if (!$smsforward_rec) { + continue; } + + $tmp_forward = User::find($smsforward_rec); + if (!$tmp_forward) { + continue; + } + + $rec_id[] = $tmp_forward->id; } // wir mergen die eben erstellten arrays und entfernen doppelte eintraege |
