Bugzilla – Attachment 17186 Details for
Bug 6554
Resolve encoding problems with corrected UTF8 handling in templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-6554-Fix-error-caused-by-modifying-_-in-a-map.patch (text/plain), 1.55 KB, created by
Colin Campbell
on 2013-04-04 10:25:28 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2013-04-04 10:25:28 UTC
Size:
1.55 KB
patch
obsolete
>From e7af77969966155b77438fe70e47ea26be58bbce Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 4 Apr 2013 10:54:03 +0100 >Subject: [PATCH] Bug 6554 Fix error caused by modifying $_ in a map > >Error 'Modification of a read-only value attempted' triggered >on login because of manipulation of $_ in the map > >Moved the mod to a loop as recommended in the doc for map >--- > C4/Context.pm | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 4d170b2..fee8752 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -1104,9 +1104,22 @@ 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 >- @_; >+ my ( >+ $usernum, $userid, $usercnum, $userfirstname, >+ $usersurname, $userbranch, $branchname, $userflags, >+ $emailaddress, $branchprinter, $persona >+ ) = @_; >+ for ( >+ $usernum, $userid, $usercnum, $userfirstname, >+ $usersurname, $userbranch, $branchname, $userflags, >+ $emailaddress, $branchprinter, $persona >+ ) >+ { >+ utf8::decode($_) if $_; >+ } >+ >+ # CGI::Session doesn't handle utf-8, so we decode it here >+ > my $var=$context->{"activeuser"} || ''; > my $cell = { > "number" => $usernum, >-- >1.8.2.135.g7b592fa >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6554
:
4558
|
4560
|
4561
|
4562
|
4563
|
4564
|
5962
|
6041
|
6065
|
6070
|
6071
|
6072
|
6073
|
6076
|
6077
|
6078
|
6079
|
6080
|
6083
|
6084
|
6085
|
6108
|
10118
|
16780
|
16797
|
16857
|
16905
|
16929
|
16930
|
16931
|
16932
|
16960
|
16961
|
16962
|
16963
|
16964
|
16966
|
16968
|
16969
|
16984
|
16985
|
16986
|
16987
|
16988
|
16989
|
17179
|
17186
|
17187
|
17327
|
17328
|
18746
|
18747
|
18749
|
18750
|
21318
|
21399
|
21478
|
21488
|
21506
|
21509
|
21581
|
21629
|
21631
|
21632
|
21682
|
21937
|
21955
|
21978
|
21980
|
21981
|
23107
|
23140