From fc72fec7289e7e502293cb95a8b2d9ed9e649cbb Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 4 Apr 2013 08:34:47 +0200 Subject: [PATCH] Bug 6554: Followup for decoding in userenv Content-Type: text/plain; charset=utf-8 Thanks to Colin. He reported this problem: Modification of a read-only value attempted at C4/Context.pm line 1107. $_ is an alias to a value which may be read-only in the map call. Could not reproduce this error, but this should prevent it. --- C4/Context.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 4d170b2..4097321 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -1105,7 +1105,7 @@ set_userenv is called in Auth.pm #' sub set_userenv { my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $branchprinter, $persona)= - map { utf8::decode($_); $_ } # CGI::Session doesn't handle utf-8, so we decode it here + map { my $a= $_; utf8::decode($a); $a; } # CGI::Session doesn't handle utf-8, so we decode it here @_; my $var=$context->{"activeuser"} || ''; my $cell = { -- 1.7.7.6