Skip to content

Commit 67447ba

Browse files
committed
Fix bug with eventlog viewer when user is deleted
1 parent 7f7b8ee commit 67447ba

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/templates/EventLog/View.phtml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ $object_user_id = (
2828
$object instanceof Event ? $object->getUserId() : null
2929
);
3030

31-
$object_user = (
32-
!is_null( $object_user_id ) ? new User( $object_user_id ) : null
33-
);
31+
try {
32+
$object_user = (
33+
!is_null( $object_user_id ) ? new User( $object_user_id ) : null
34+
);
35+
} catch (UserNotFoundException $e) {
36+
$object_user = null;
37+
}
3438

3539
if ( !$object instanceof Event ) {
3640
$title = 'Event Not Found';

0 commit comments

Comments
 (0)