vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r9878: LJM-1659: some more checks

Committer: vsukhanov
LJM-1659: some more checks
U   trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm
Modified: trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm
===================================================================
--- trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm	2010-12-21 09:23:52 UTC (rev 9877)
+++ trunk/cgi-bin/LJ/SUP/RPC/Command/comments_tree.pm	2010-12-21 09:25:25 UTC (rev 9878)
@@ -183,7 +183,8 @@
         LJ::CleanHTML::clean_comment(\$text, { 'preformatted' => $comment->{'props'}->{'opt_preformatted'},
                                                'anon_comment' => $comment->{posterid} ? 0 : 1,
                                     });
-        my $journaltype = $pu->{journaltype};
+        
+        my $journaltype = $pu ? $pu->{journaltype} : '';
 
         ## Provide identity info
         my %ident_info = ();
@@ -203,7 +204,7 @@
             datepost_unix => $comment->{datepost_unix},
             poster   => { journal_type => $journaltype, 
                           username => $comment->{userpost},
-                          ($pu->is_identity ? (identity => \%ident_info) : ()),
+                          (($pu and $pu->is_identity) ? (identity => \%ident_info) : ()),
                           },
             posterid => $comment->{posterid},
             state    => $comment->{state},

Tags: ljcom, pm, vadvs
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