Bug 2505: Suppress some warnings emitted by members-home.pl
an undefined value in branch and the undef selected
can generate a large amount of warning noise
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit ffa86e29b5)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
44e22f3e83
commit
d5d5f0f5ab
|
|
@ -31,6 +31,8 @@ my $query = new CGI;
|
|||
my $branch = $query->param('branchcode');
|
||||
my $template_name;
|
||||
|
||||
$branch = q{} unless defined $branch;
|
||||
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "members/member.tmpl",
|
||||
query => $query,
|
||||
|
|
@ -42,13 +44,12 @@ my ($template, $loggedinuser, $cookie)
|
|||
|
||||
my $branches = GetBranches;
|
||||
my @branchloop;
|
||||
foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
|
||||
my $selected = 1 if $branches->{$_}->{branchcode} eq $branch;
|
||||
my %row = ( value => $_,
|
||||
selected => $selected,
|
||||
foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %{$branches}) {
|
||||
push @branchloop, {
|
||||
value => $_,
|
||||
selected => ($branches->{$_}->{branchcode} eq $branch),
|
||||
branchname => $branches->{$_}->{branchname},
|
||||
);
|
||||
push @branchloop, \%row;
|
||||
};
|
||||
}
|
||||
|
||||
my @categories;
|
||||
|
|
|
|||
Loading…
Reference in New Issue