From 375fa710a8a14430107c00cd5e1a7f5933607465 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Feb 2026 11:41:16 +0100 Subject: [PATCH] Bug 41895: Fix if no user defined --- C4/Context.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 5da92e83f9a..27525a77b6c 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -21,8 +21,6 @@ use Modern::Perl; use vars qw($AUTOLOAD $context); -our $REQUEST_ENV; - BEGIN { if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled @@ -649,7 +647,7 @@ Retrieves a hash for user environment variables. =cut sub userenv { - return Koha::Context::UserEnv->get_all(); + return Koha::Context::UserEnv->get_all() if Koha::Context::UserEnv->exists(); } =head2 set_userenv_from_session -- 2.43.0