Browse Source

* Fix warning when running on empty logs.

Christoph Berg 22 years ago
parent
commit
ced24377aa
2 changed files with 3 additions and 0 deletions
  1. 1 0
      docs/Changelog
  2. 2 0
      modules/Pisg/HTMLGenerator.pm

+ 1 - 0
docs/Changelog

@@ -1,5 +1,6 @@
 pisg (0.61) - ??
 pisg (0.61) - ??
    Changes by Christoph Berg:
    Changes by Christoph Berg:
+   * Fix warning when running on empty logs.
    * More nick sanitizing.
    * More nick sanitizing.
    * Remove whitespace around user pictures, border="0", title.
    * Remove whitespace around user pictures, border="0", title.
    * docs/:
    * docs/:

+ 2 - 0
modules/Pisg/HTMLGenerator.pm

@@ -2131,6 +2131,8 @@ sub _topactive {
     (@top_active) = @top_active[0..($self->{cfg}->{activenicks}+$self->{cfg}->{activenicks2}-1)];
     (@top_active) = @top_active[0..($self->{cfg}->{activenicks}+$self->{cfg}->{activenicks2}-1)];
     if(@top_active) {
     if(@top_active) {
         $self->{stats}->{topactive_lines} = $self->{stats}->{lines}{$top_active[0]};
         $self->{stats}->{topactive_lines} = $self->{stats}->{lines}{$top_active[0]};
+    } else {
+        $self->{stats}->{topactive_lines} = 1;
     }
     }
             
             
     foreach (@top_active) {
     foreach (@top_active) {