Bugzilla – Attachment 62538 Details for
Bug 18461
Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18461: Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü)
Bug-18461-Internal-server-error-while-approving-OP.patch (text/plain), 1.72 KB, created by
Marc Véron
on 2017-04-21 16:26:26 UTC
(
hide
)
Description:
Bug 18461: Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü)
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-04-21 16:26:26 UTC
Size:
1.72 KB
patch
obsolete
>From 94c5ff5ae09dbf017a581e7523ff5a6c49cb737c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 21 Apr 2017 18:21:53 +0200 >Subject: [PATCH] =?UTF-8?q?Bug=2018461:=20Internal=20server=20error=20whil?= > =?UTF-8?q?e=20approving=20OPAC-edited=20patron=20attributes=20containing?= > =?UTF-8?q?=20umlauts=20(=C3=A4=C3=B6=C3=BC)?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >If a OPAC user enters text containing umlauts (äöü) in a patron atribute and >saves it, the Staff client will get an inernal server error in >members-update.pl (approving). > >E.g. a text like 111ä222 leads to the following in plack error log: > >malformed UTF-8 character in JSON string, at character offset 14 (before >"\x{fffd}2","code":"T...") at (...)/Koha/Patron/Modifications.pm line 100. > >To test: >- Reproduce problem above >- Apply patch >- Verify that Home > Patron > Update records displays without error > and 'New value' displays properly >--- > Koha/Patron/Modifications.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron/Modifications.pm b/Koha/Patron/Modifications.pm >index 403b955..3c683b4 100644 >--- a/Koha/Patron/Modifications.pm >+++ b/Koha/Patron/Modifications.pm >@@ -97,7 +97,7 @@ sub pending { > while ( my $row = $sth->fetchrow_hashref() ) { > foreach my $key ( keys %$row ) { > if ( defined $row->{$key} && $key eq 'extended_attributes' ) { >- my $attributes = decode_json( $row->{$key} ); >+ my $attributes = JSON->new->utf8(0)->decode( $row->{$key} ); > my @pending_attributes; > foreach my $attr ( @{$attributes} ) { > push @pending_attributes, >-- >2.1.4
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 18461
:
62538
|
62569
|
62617
|
62631
|
62632
|
62666
|
62667