Don't crash if there are no records of some type https://www.virtualmin.com/node/41676

This commit is contained in:
Jamie Cameron
2016-08-10 13:41:28 -07:00
parent 52180cea58
commit 4dfaaaff09

View File

@@ -146,7 +146,7 @@ if (!$access{'ro'} && $type eq 'master') {
push(@hcols, &ui_link("edit_recs.cgi?zone=$in{'zone'}&view=$in{'view'}&type=$in{'type'}&sort=1", ($in{'type'} eq "PTR" ? $text{'recs_addr'} : $text{'recs_name'}) ) );
push(@hcols, &ui_link("edit_recs.cgi?zone=$in{'zone'}&view=$in{'view'}&type=$in{'type'}&sort=5", $text{'recs_type'}) ) if ($in{'type'} eq "ALL");
push(@hcols, $text{'recs_ttl'});
my @hmap = @{$hmap{$in{'type'}}};
my @hmap = $hmap{$in{'type'}} ? @{$hmap{$in{'type'}}} : ( );
foreach my $h (@hmap) {
push(@hcols, &ui_link("edit_recs.cgi?zone=$in{'zone'}&view=$in{'view'}&type=$in{'type'}&sort=2",$h) );
}