Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r20281: LJSUP-10108 (fix 'unitialized value in s...

Committer: ailyin
LJSUP-10108 (fix 'unitialized value in substitution iterator' in LJ::Lang +656)
U   trunk/cgi-bin/LJ/Lang.pm
Modified: trunk/cgi-bin/LJ/Lang.pm
===================================================================
--- trunk/cgi-bin/LJ/Lang.pm	2011-10-11 10:58:06 UTC (rev 20280)
+++ trunk/cgi-bin/LJ/Lang.pm	2011-10-11 11:12:37 UTC (rev 20281)
@@ -841,7 +841,7 @@
     my $count       = $vars->{$varname};
     my @wlist       = split( /\|/, $wordlist );
     my $plural_form = plural_form( $lang, $count );
-    return $wlist[$plural_form];
+    return ( exists $wlist[$plural_form] ? $wlist[$plural_form] : '' );
 }
 
 my %PLURAL_FORMS_HANDLERS = (

Tags: ailyin, andy, 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