[dw-free] clean up error logs
[commit: http://hg.dwscoalition.org/dw-free/rev/edd7b53e1911]
http://bugs.dwscoalition.org/show_bug.cgi?id=2812
Don't try to get a comment count for deleted entries.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2812
Don't try to get a comment count for deleted entries.
Patch by
Files modified:
- cgi-bin/DW/Controller/CommentCount.pm
--------------------------------------------------------------------------------
diff -r bd937c21f12f -r edd7b53e1911 cgi-bin/DW/Controller/CommentCount.pm
--- a/cgi-bin/DW/Controller/CommentCount.pm Tue Sep 07 18:48:51 2010 +0800
+++ b/cgi-bin/DW/Controller/CommentCount.pm Tue Sep 07 18:59:06 2010 +0800
@@ -37,6 +37,7 @@ sub commentcount_handler {
my $ditemid = $args->{ditemid};
my $uid = LJ::get_userid( $args->{user} );
$entry = LJ::Entry->new( $uid, ditemid => $ditemid ) if $uid;
+ $entry = undef unless $entry && $entry->valid;
}
$count = $entry->reply_count if $entry;
--------------------------------------------------------------------------------
