Bug 6137: fix a Circulation bug. userenv null
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit f4a5206ae0)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
f5a59eaa8c
commit
d3a5a3ece3
|
|
@ -1903,8 +1903,8 @@ sub _GetCircControlBranch {
|
|||
my $circcontrol = C4::Context->preference('CircControl');
|
||||
my $branch;
|
||||
|
||||
if ($circcontrol eq 'PickupLibrary') {
|
||||
$branch= C4::Context->userenv->{'branch'} if C4::Context->userenv;
|
||||
if ($circcontrol eq 'PickupLibrary' and (C4::Context->userenv and C4::Context->userenv->{'branch'}) ) {
|
||||
$branch= C4::Context->userenv->{'branch'};
|
||||
} elsif ($circcontrol eq 'PatronLibrary') {
|
||||
$branch=$borrower->{branchcode};
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue