madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22282: LJSUP-12596: Error 500 in some entries

Committer: sbelyaev
LJSUP-12596: Error 500 in some entries
U   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";

Tags: livejournal, madeon, pm, sbelyaev
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