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

[livejournal] r20315: LJSUP-10140 (fix calls of LJ::Lang::set_...

Committer: ailyin
LJSUP-10140 (fix calls of LJ::Lang::set_text to use the updated prototype)
U   trunk/cgi-bin/LJ/Lang.pm
Modified: trunk/cgi-bin/LJ/Lang.pm
===================================================================
--- trunk/cgi-bin/LJ/Lang.pm	2011-10-14 07:43:05 UTC (rev 20314)
+++ trunk/cgi-bin/LJ/Lang.pm	2011-10-14 07:56:17 UTC (rev 20315)
@@ -391,7 +391,7 @@
         undef, $lnid, $dmid, $itid, );
 
     if ( defined $text ) {
-        my $userid = $opts->{'userid'} + 0;
+        my $userid = int( $opts->{'userid'} || 0 );
 
         # Strip bad characters
         $text =~ s/\r//;
@@ -421,7 +421,7 @@
     }
 
     my $revid     = LJ::alloc_global_counter("ml_latest_updates_counter");
-    my $staleness = int $opts->{'staleness'};
+    my $staleness = int( $opts->{'staleness'} || 0 );
     $dbh->do(
         qq{
             REPLACE INTO ml_latest

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