33_readingsGroup.pm: prevent crash on empty reading list if sorting is useed
git-svn-id: https://svn.fhem.de/fhem/trunk@12692 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -788,7 +788,7 @@ readingsGroup_2html($;$)
|
||||
@l = sort rgSort @l;
|
||||
}
|
||||
|
||||
$hash->{groupedList} = ();
|
||||
$hash->{groupedList} = [];
|
||||
foreach my $n (@l) {
|
||||
my $cg1 = @{$n}[1]; my $cg2 = @{$n}[2]; my $cg3 = @{$n}[3]; my $cg4 = @{$n}[4];
|
||||
my @l = @list[1..@list-1];
|
||||
@@ -797,7 +797,7 @@ readingsGroup_2html($;$)
|
||||
push @{$hash->{groupedList}}, '<br2>' if( $hash->{groupedList} );
|
||||
push @{$hash->{groupedList}}, @l;
|
||||
}
|
||||
@list = @{$hash->{groupedList}};
|
||||
@list = @{$hash->{groupedList}} if( $hash->{groupedList} );
|
||||
}
|
||||
|
||||
my $first = 1;
|
||||
|
||||
Reference in New Issue
Block a user