Skip to content
Snippets Groups Projects
Commit da99b611 authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Resolve "Fehler bei Terminvergabe, wenn Nutzer gelöscht wird"

Closes #1683

Merge request studip/studip!1087
parent 7965631e
No related branches found
No related tags found
No related merge requests found
......@@ -258,7 +258,7 @@ class ConsultationSlot extends SimpleORMap
$event->event->summary = sprintf(
_('Termin mit %s'),
$booking->user->getFullName()
$booking->user ? $booking->user->getFullName() : _('unbekannt')
);
$event->event->description = $booking->reason;
} else {
......@@ -267,7 +267,8 @@ class ConsultationSlot extends SimpleORMap
count($bookings)
);
$event->event->description = implode("\n\n----\n\n", $bookings->map(function ($booking) {
return "- {$booking->user->getFullName()}:\n{$booking->reason}";
$name = $booking->user ? $booking->user->getFullName() : _('unbekannt');
return "- {$name}:\n{$booking->reason}";
}));
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment