From a4cb9a56a2f89f6ba92ca1de9079a318c6268fc3 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 6 May 2022 07:09:34 +0000 Subject: [PATCH] Bug 30702: Fix Context.pm L785 warning on sessionID Trivial fix. Before working on bug 29954. Test plan: Run a few tests like t/Context.t, t/db_dependent/Auth.t and t/db_dependent/Circulation.t. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- C4/Context.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index b42f933b08..8cb9bdefe7 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -782,7 +782,7 @@ Destroys the hash for activeuser user environment variables. sub _unset_userenv { my ($sessionID)= @_; - undef $context->{"activeuser"} if ($context->{"activeuser"} eq $sessionID); + undef $context->{activeuser} if $sessionID && $context->{activeuser} && $context->{activeuser} eq $sessionID; } -- 2.20.1