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

[livejournal] r20181: LJSUP-9965: [internal] remove extra warn...

Committer: gariev
LJSUP-9965: [internal] remove extra warnings from LJ::Lang
U   trunk/cgi-bin/LJ/Lang.pm
Modified: trunk/cgi-bin/LJ/Lang.pm
===================================================================
--- trunk/cgi-bin/LJ/Lang.pm	2011-09-30 04:01:43 UTC (rev 20180)
+++ trunk/cgi-bin/LJ/Lang.pm	2011-09-30 04:58:56 UTC (rev 20181)
@@ -680,12 +680,12 @@
 sub get_text_multi {
     my ( $lang, $dmid, $codes ) = @_;
 
+    $lang ||= $LJ::DEFAULT_LANG;
     return {} unless $codes;
     return { map { $_ => $_ } @$codes }
         if $lang eq 'debug';
 
     $dmid = int( $dmid || 1 );
-    $lang ||= $LJ::DEFAULT_LANG;
     load_lang_struct() unless $LS_CACHED;
 
     ## %strings: code --> text
@@ -886,7 +886,8 @@
 # Croatian, Czech, Russian, Slovak, Ukrainian, Belarusian
 sub plural_form_ru {
     my ($count) = @_;
-
+    $count = 0 unless defined $count;
+ 
     return 0 if ( $count % 10 == 1 && $count % 100 != 11 );
     return 1
         if ( $count % 10 >= 2 && $count % 10 <= 4 )

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