vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17102: $self->entry may return undef for non va...

Committer: vsukhanov
$self->entry may return undef for non valid comment
U   trunk/cgi-bin/LJ/Comment.pm
Modified: trunk/cgi-bin/LJ/Comment.pm
===================================================================
--- trunk/cgi-bin/LJ/Comment.pm	2010-08-09 09:55:04 UTC (rev 17101)
+++ trunk/cgi-bin/LJ/Comment.pm	2010-08-10 02:52:56 UTC (rev 17102)
@@ -336,7 +336,8 @@
 
 sub dtalkid {
     my $self = shift;
-    my $entry = $self->entry;
+    my $entry = $self->entry; # may return undef for non valid comment
+    return undef unless $entry;
     return ($self->jtalkid * 256) + $entry->anum;
 }
 

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