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

[livejournal] r17834: LJSUP-6905: Resolve 'uninitialized value...

Committer: gariev
LJSUP-6905: Resolve 'uninitialized value' in Memcached perl module.

U   trunk/cgi-bin/ljuserpics.pl
Modified: trunk/cgi-bin/ljuserpics.pl
===================================================================
--- trunk/cgi-bin/ljuserpics.pl	2010-12-01 07:26:48 UTC (rev 17833)
+++ trunk/cgi-bin/ljuserpics.pl	2010-12-01 08:16:31 UTC (rev 17834)
@@ -100,11 +100,14 @@
 
     ## avoid requesting upic multiple times.
     ## otherwise memcached returns it multiple times too.
+    ##
+    ## don't load (non-existent) upics with negative id
+    ## see also LJSUP-5502 and hook 'control_default_userpic'
     my %uniq = ();
     $idlist = [ grep { 
                         my $u = $_->[0];
                         my $upicid = $_->[1];
-                        not $uniq{$u}->{$upicid}++ 
+                        $upicid>0 && not $uniq{$u}->{$upicid}++ 
                     } @$idlist ];
 
     my @load_list;

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