alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[livejournal] r22272: LJSUP-12589: Fix call to method userid o...

Committer: afedorov
LJSUP-12589: Fix call to method userid on an undefined object at cgi-bin/LJ/Talk/Post.pm

U   trunk/cgi-bin/LJ/Talk/Post.pm
Modified: trunk/cgi-bin/LJ/Talk/Post.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk/Post.pm	2012-06-18 15:28:41 UTC (rev 22271)
+++ trunk/cgi-bin/LJ/Talk/Post.pm	2012-06-19 07:30:51 UTC (rev 22272)
@@ -617,8 +617,11 @@
     ## 3. Do not display captcha if user has social capital more than 15
     ##
     ##
-    my $soc_cap = LJ::PersonalStats::DB->fetch_raw('ratings', { func => 'get_authority', journal_id => $commenter->userid });
-    $soc_cap = int($soc_cap->{result}->{authority}/1000);
+    my $soc_cap = 0;
+    unless ($anon_commenter) {
+        $soc_cap = LJ::PersonalStats::DB->fetch_raw('ratings', { func => 'get_authority', journal_id => $commenter->userid });
+        $soc_cap = int($soc_cap->{result}->{authority}/1000);
+    }
     return if $soc_cap > 15;
  
  

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