журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[livejournal] r22762: LJSUP-13464: Fix error Can't call method...

Committer: nnikulochkina
LJSUP-13464: Fix error Can't call method "userid" on an undefined value at /home/lj/cgi-bin/LJ/Entry/Repost.pm line 323
U   trunk/cgi-bin/LJ/Entry/Repost.pm
Modified: trunk/cgi-bin/LJ/Entry/Repost.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry/Repost.pm	2012-08-29 08:52:46 UTC (rev 22761)
+++ trunk/cgi-bin/LJ/Entry/Repost.pm	2012-08-29 10:13:57 UTC (rev 22762)
@@ -320,7 +320,7 @@
     my $paid     = 0;
     my $cost     = 0;
     
-    my $is_owner = ($entry_obj->posterid == $u->userid) ? 1 : 0;
+    my $is_owner = ($u && $entry_obj->posterid == $u->userid) ? 1 : 0;
 
     if ($u) {
         ($reposted, $cost) = __get_repost( $entry_obj->journal, 

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