Skip to content
Snippets Groups Projects
Commit 6d947cca authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

prevent php8 warnings, fixes #2401

Closes #2401

Merge request studip/studip!1594
parent fd173b4c
No related branches found
No related tags found
No related merge requests found
...@@ -186,6 +186,7 @@ class messaging ...@@ -186,6 +186,7 @@ class messaging
$reply_to = $sender->Email; $reply_to = $sender->Email;
} }
$attachments = []; $attachments = [];
$attachments_as_links = false;
if ($GLOBALS['ENABLE_EMAIL_ATTACHMENTS'] && $msg->attachment_folder) { if ($GLOBALS['ENABLE_EMAIL_ATTACHMENTS'] && $msg->attachment_folder) {
$attachments = $msg->attachment_folder->file_refs; $attachments = $msg->attachment_folder->file_refs;
$size_of_attachments = array_sum($attachments->pluck('size')) ?: 0; $size_of_attachments = array_sum($attachments->pluck('size')) ?: 0;
...@@ -357,10 +358,16 @@ class messaging ...@@ -357,10 +358,16 @@ class messaging
// diese user_id schreiben wir in ein tempraeres array // diese user_id schreiben wir in ein tempraeres array
foreach ($rec_id as $one) { foreach ($rec_id as $one) {
$smsforward_rec = User::find($one)->smsforward_rec; $smsforward_rec = User::find($one)->smsforward_rec;
$tmp_forward_id = User::find($smsforward_rec)->user_id; if (!$smsforward_rec) {
if ($tmp_forward_id) { continue;
$rec_id[] = $tmp_forward_id;
} }
$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 // wir mergen die eben erstellten arrays und entfernen doppelte eintraege
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment