From 08933d3e0a290e3492891165def858034ffe5577 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 Signed-off-by: Fridolin Somers --- 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.39.5