Bugzilla – Attachment 62707 Details for
Bug 18494
Fix Letters.t (follow-up of 15702)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18494: Fix Letters.t (follow-up of 15702)
Bug-18494-Fix-Letterst-follow-up-of-15702.patch (text/plain), 1.84 KB, created by
Lari Taskula
on 2017-04-26 08:46:25 UTC
(
hide
)
Description:
Bug 18494: Fix Letters.t (follow-up of 15702)
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2017-04-26 08:46:25 UTC
Size:
1.84 KB
patch
obsolete
>From 9f59c5fe1518638bfa4ab75468584a3dc0f76687 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Wed, 26 Apr 2017 08:40:13 +0000 >Subject: [PATCH] Bug 18494: Fix Letters.t (follow-up of 15702) > >koha@kohacommunity:~/kohaclone$ perl t/db_dependent/Letters.t >1..81 >ok 1 - use C4::Context; >ok 2 - use C4::Members; >ok 3 - use C4::Acquisition; >ok 4 - use C4::Biblio; >ok 5 - use C4::Letters; >Can't call method "get_expiry_date" on an undefined value at >/home/koha/kohaclone/C4/Members.pm line 465. >Looks like your test exited with 7 just after 5. > >This is caused by the new trimming functionality in AddMember when categorycode >is passed as a HASHref. Before trimming, make sure that the value is not a ref. > >To test: >1. perl t/db_dependent/Letters.t >2. Observe above failure >3. Apply patch >4. Watch it pass >5. Also prove t/db_dependent/Members.t >--- > C4/Members.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index e68a6fa..22c860b 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -358,7 +358,8 @@ sub ModMember { > > # trim whitespace from data which has some non-whitespace in it. > foreach my $field_name (keys(%data)) { >- if ( defined $data{$field_name} && $data{$field_name} =~ /\S/ ) { >+ if ( defined $data{$field_name} && $data{$field_name} =~ /\S/ >+ && !ref($data{$field_name}) ) { > $data{$field_name} =~ s/^\s*|\s*$//g; > } > } >@@ -452,7 +453,8 @@ sub AddMember { > > # trim whitespace from data which has some non-whitespace in it. > foreach my $field_name (keys(%data)) { >- if ( defined $data{$field_name} && $data{$field_name} =~ /\S/ ) { >+ if ( defined $data{$field_name} && $data{$field_name} =~ /\S/ >+ && !ref($data{$field_name}) ) { > $data{$field_name} =~ s/^\s*|\s*$//g; > } > } >-- >2.7.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 18494
:
62689
|
62706
|
62707
|
62749
|
62926
|
62954