From 77e64d6be02e0f8fbd2231c3f6b806a5076c241a Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 14 Apr 2011 15:03:37 +1200 Subject: [PATCH] Fix for Reserves.t allow the tests to run without a logged in user (cherry picked from commit 67e3b861819f62d125f40564fe6a7370ee47e219) Signed-off-by: Chris Nighswonger --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d20d019b36..2869fc65fa 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1836,7 +1836,7 @@ sub _GetCircControlBranch { my $branch; if ($circcontrol eq 'PickupLibrary') { - $branch= C4::Context->userenv->{'branch'}; + $branch= C4::Context->userenv->{'branch'} if C4::Context->userenv; } elsif ($circcontrol eq 'PatronLibrary') { $branch=$borrower->{branchcode}; } else { -- 2.39.5