Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r17953: Minor bugfix

Committer: gariev
Minor bugfix
Can't call method "user" on an undefined value at /home/lj/cgi-bin/LJ/User.pm line 3499
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2010-12-17 05:02:04 UTC (rev 17952)
+++ trunk/cgi-bin/LJ/User.pm	2010-12-17 05:03:12 UTC (rev 17953)
@@ -3495,7 +3495,7 @@
 # can $u post to $targetu?
 sub can_post_to {
     my ($u, $targetu) = @_;
-
+    return unless $u && $targetu;
     return LJ::can_use_journal($u->id, $targetu->user);
 }
 

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