madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20464: LJSUP-10277: Error at /home/lj/cgi-bin/L...

Committer: sbelyaev
LJSUP-10277: Error at /home/lj/cgi-bin/LJ/ControlStrip.pm line 355 in the blank journal
U   trunk/cgi-bin/LJ/ControlStrip.pm
Modified: trunk/cgi-bin/LJ/ControlStrip.pm
===================================================================
--- trunk/cgi-bin/LJ/ControlStrip.pm	2011-11-01 11:07:49 UTC (rev 20463)
+++ trunk/cgi-bin/LJ/ControlStrip.pm	2011-11-01 11:45:06 UTC (rev 20464)
@@ -352,13 +352,16 @@
     }
     
     my $daycounts = LJ::get_daycounts($journal, $remote);
-    my @early_date = @{$daycounts->[0]};
-    my @last_date = @{$daycounts->[-1]};
-    pop @early_date;
-    pop @last_date;
+    if ($daycounts) {
+        my @early_date = @{$daycounts->[0]};
+        my @last_date = @{$daycounts->[-1]};
+        pop @early_date;
+        pop @last_date;
+    
+        $tmpl->param( 'EARLY_DATE' => join(',', @early_date),
+                      'LAST_DATE'  => join(',', @last_date));
+    }
 
-    $tmpl->param( 'EARLY_DATE' => join(',', @early_date),
-                  'LAST_DATE'  => join(',', @last_date));
     $tmpl->param(flatten($data), link_mobile => $mobile_link );
 
     return $tmpl->output;    

Tags: livejournal, madeon, pm, sbelyaev
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