fixing sloppy coding in moremember.pl: 500 error when paton missing branchcode
authorJoshua Ferraro <jmf@liblime.com>
Sun, 30 Sep 2007 02:45:04 +0000 (21:45 -0500)
committerChris Cormack <crc@liblime.com>
Sun, 30 Sep 2007 08:05:33 +0000 (03:05 -0500)
 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>
members/moremember.pl

index 95ac2a0..484c954 100755 (executable)
@@ -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 );