Skip to content

Commit a3f5b3a

Browse files
committedJul 10, 2012
Handle the case when a friend approve message no longer exist.
1 parent 7a6ee77 commit a3f5b3a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎docs/changelog/7.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- fixed #12345: tickets in trash still show up
2525
- fixed #12305: dbSlave breaks WebGUI when not able to connect
2626
- fixed: Http Proxy assets with no URL to proxy cannot be deleted.
27+
- fixed: Friends request messages that no longer exist throw a warning.
2728

2829
7.10.24
2930
- fixed #12318: asset error causes asset manager to fail

‎lib/WebGUI/Friends.pm

+4-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ sub approveAddRequest {
9696
status => 'unread',
9797
sentBy => $self->user->userId,
9898
});
99-
$inbox->getMessage($invite->{messageId})->setStatus('completed');
99+
my $message = $inbox->getMessage($invite->{messageId});
100+
if ($message) {
101+
$message->setStatus('completed');
102+
}
100103
$db->deleteRow("friendInvitations", "inviteId", $inviteId);
101104
}
102105

0 commit comments

Comments
 (0)