Skip to content

Commit

Permalink
Handle the case when a friend approve message no longer exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Jul 10, 2012
1 parent 7a6ee77 commit a3f5b3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog/7.x.x.txt
Expand Up @@ -24,6 +24,7 @@
- fixed #12345: tickets in trash still show up
- fixed #12305: dbSlave breaks WebGUI when not able to connect
- fixed: Http Proxy assets with no URL to proxy cannot be deleted.
- fixed: Friends request messages that no longer exist throw a warning.

7.10.24
- fixed #12318: asset error causes asset manager to fail
Expand Down
5 changes: 4 additions & 1 deletion lib/WebGUI/Friends.pm
Expand Up @@ -96,7 +96,10 @@ sub approveAddRequest {
status => 'unread',
sentBy => $self->user->userId,
});
$inbox->getMessage($invite->{messageId})->setStatus('completed');
my $message = $inbox->getMessage($invite->{messageId});
if ($message) {
$message->setStatus('completed');
}
$db->deleteRow("friendInvitations", "inviteId", $inviteId);
}

Expand Down

0 comments on commit a3f5b3a

Please sign in to comment.