wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18612: LJSUP-8194. Minor fix

Committer: gprochaev
LJSUP-8194. Minor fix

U   trunk/cgi-bin/LJ/Browse.pm
Modified: trunk/cgi-bin/LJ/Browse.pm
===================================================================
--- trunk/cgi-bin/LJ/Browse.pm	2011-03-17 08:58:43 UTC (rev 18611)
+++ trunk/cgi-bin/LJ/Browse.pm	2011-03-17 09:01:52 UTC (rev 18612)
@@ -997,7 +997,9 @@
         @entries =
             grep {
                 ## Filter off suspended entries, deleted communities, suspended posters
-                $_->is_suspended || $_->journal->is_deleted || $_->poster->is_suspended ? 0 : 1;
+                return 0 unless $_ && $_->valid;
+                my $poster = $_->poster;
+                $_->is_suspended || $_->journal->is_deleted || ($poster && $poster->is_suspended) ? 0 : 1;
             }
             map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) }      ## Create LJ::Entry object
             grep { $_->{journalid} }                                                ## remove SEO posts
@@ -1015,7 +1017,9 @@
             @entries =
                 grep {
                     ## Filter off suspended entries, deleted communities, suspended posters
-                    $_->is_suspended || $_->journal->is_deleted || $_->poster->is_suspended ? 0 : 1;
+                    return 0 unless $_ && $_->valid;
+                    my $poster = $_->poster;
+                    $_->is_suspended || $_->journal->is_deleted || ($poster && $poster->is_suspended) ? 0 : 1;
                 }
                 map { LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid}) }
                 @$post_ids;

Tags: livejournal, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments