Bug 11084 [QA Followup] - Suppress userenv warning

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2015-04-22 08:58:08 -04:00 committed by Brendan A Gallagher
parent 8a87434f7a
commit d1057b80da
1 changed files with 2 additions and 1 deletions

View File

@ -2336,7 +2336,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'} ) )
{