fixing sloppy coding in moremember.pl: 500 error when paton missing branchcode

Got an error: Can't use an undefined value as a HASH reference at
                /home/jmf/koha_30_prerelease/koha/production/intranet/cgi-bin/members/moremember.pl line 191.

Signed-off-by: Chris Cormack <crc@liblime.com>
This commit is contained in:
Joshua Ferraro 2007-09-29 21:45:04 -05:00 committed by Chris Cormack
parent 7be258131a
commit 36a70c5f93

View file

@ -187,9 +187,8 @@ if ( C4::Context->preference("IndependantBranches") ) {
}
$samebranch = 1 if ( $userenv->{flags} == 1 );
}
$data->{'branchname'} =
( ( GetBranchDetail( $data->{'branchcode'} ) )->{'branchname'} );
my $branchdetail = GetBranchDetail( $data->{'branchcode'});
$data->{'branchname'} = $branchdetail->{branchname};
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );