Committer: sbelyaev
LJSUP-12596: Error 500 in some entriesU trunk/cgi-bin/LJ/Comment.pm U trunk/cgi-bin/LJ/S2/ReplyPage.pm
Modified: trunk/cgi-bin/LJ/Comment.pm =================================================================== --- trunk/cgi-bin/LJ/Comment.pm 2012-06-19 11:12:29 UTC (rev 22281) +++ trunk/cgi-bin/LJ/Comment.pm 2012-06-19 11:41:34 UTC (rev 22282) @@ -88,7 +88,7 @@ $jtalkid = int($dtalkid / 256); } - croak("need to supply jtalkid or dtalkid") + return undef unless $jtalkid; croak("unknown parameter: " . join(", ", keys %opts)) Modified: trunk/cgi-bin/LJ/S2/ReplyPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/ReplyPage.pm 2012-06-19 11:12:29 UTC (rev 22281) +++ trunk/cgi-bin/LJ/S2/ReplyPage.pm 2012-06-19 11:41:34 UTC (rev 22282) @@ -65,6 +65,12 @@ if ($editid) { my $errref; $comment = LJ::Comment->new($u, dtalkid => $editid); + + unless ($comment) { + my $comment = LJ::Lang::ml('comment.not.found'); + $opts->{status} = "404 $comment)"; + return "<p>$comment</p>"; + } unless ($remote) { my $redir = LJ::eurl( LJ::Request->current_page_url ); $opts->{'redir'} = "$LJ::SITEROOT/?returnto=$redir&errmsg=notloggedin";