From 755bf6aca7e5754264952c69b4bdbdc74c4eafbd Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 27 May 2009 06:53:17 -0500 Subject: [PATCH] minor fix - don't declare variables in a conditional Signed-off-by: Galen Charlton --- circ/branchtransfers.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index d54e8fd065..85ad30e838 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -40,8 +40,9 @@ my $query = new CGI; if (!C4::Context->userenv){ my $sessionID = $query->cookie("CGISESSID"); - my $session = get_session($sessionID); - if ($session->param('branch') eq 'NO_LIBRARY_SET'){ + my $session; + $session = get_session($sessionID) if $sessionID; + if (!$session or $session->param('branch') eq 'NO_LIBRARY_SET'){ # no branch set we can't transfer print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl"); exit; -- 2.39.5