From 43ee6fb1f6d55991e827e5c2c87f3831ae98970f Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 22 Apr 2015 08:58:08 -0400 Subject: [PATCH] Bug 11084 [QA Followup] - Suppress userenv warning --- C4/Items.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index d721d53..2cb759f 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2278,7 +2278,8 @@ sub DelItemCheck { if ($onloan){ $error = "book_on_loan" } - elsif ( !C4::Context->IsSuperLibrarian() + elsif ( defined C4::Context->userenv + and !C4::Context->IsSuperLibrarian() and C4::Context->preference("IndependentBranches") and ( C4::Context->userenv->{branch} ne $item->{'homebranch'} ) ) { -- 1.7.2.5