Do not attempt to change the status on an inbox message which doesn't exist. Fixes bug #12349.

This commit is contained in:
Colin Kuskie 2012-04-02 18:33:38 -07:00
parent 07bd545538
commit 2c225f30f5
2 changed files with 5 additions and 1 deletions

View file

@ -12,6 +12,7 @@
- fixed: Crud updateFromFormPost
- fixed: encryptLogin and sslEnabled both need to be true
- fixed: Cache's setByHTTP method returns content, even when it gets an error in the request. This gives the SC asset fits.
- fixed #12349: Friends invitation error
7.10.24
- fixed #12318: asset error causes asset manager to fail

View file

@ -320,7 +320,10 @@ sub rejectAddRequest {
status => 'unread',
});
}
$inbox->getMessage($invite->{messageId})->setStatus('completed');
my $invitation = $inbox->getMessage($invite->{messageId});
if ($invitation) {
$invitation->setStatus('completed');
}
$self->session->db->deleteRow("friendInvitations", "inviteId", $inviteId);
}