Add some error checking in case an entry or comment was deleted.
Patch by fu.
diffs (17 lines):
diff -r 7a62622d9127 -r edc95acb4e6a cgi-bin/LJ/NotificationInbox.pm
--- a/cgi-bin/LJ/NotificationInbox.pm Mon Jun 07 03:03:52 2010 +0000
+++ b/cgi-bin/LJ/NotificationInbox.pm Mon Jun 07 12:18:28 2010 +0800
@@ -178,7 +178,12 @@ sub subset_items {
sub singleentry_items {
my ( $self, $itemid ) = @_;
- return grep { $_->event->class eq "LJ::Event::JournalNewComment" &&
$_->event->comment->entry->ditemid == $itemid } $self->items;
+ return grep {
+ $_->event->class eq "LJ::Event::JournalNewComment"
+ && $_->event->comment
+ && $_->event->comment->entry # may have been deleted, which breaks
all filter to entry comments
+ && $_->event->comment->entry->ditemid == $itemid
+ } $self->items;
}
# return flagged notifications
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog