Bugzilla – Attachment 101115 Details for
Bug 24892
Resolve some warnings in opac-memberentry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24892: Resolve uninitialized warns from opac-memberentry
Bug-24892-Resolve-uninitialized-warns-from-opac-me.patch (text/plain), 1.49 KB, created by
Kyle M Hall (khall)
on 2020-03-20 13:45:58 UTC
(
hide
)
Description:
Bug 24892: Resolve uninitialized warns from opac-memberentry
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-03-20 13:45:58 UTC
Size:
1.49 KB
patch
obsolete
>From d65b4b5dc521752b2428ef3a07ca1ad4b009e559 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 18 Mar 2020 13:54:52 +0000 >Subject: [PATCH] Bug 24892: Resolve uninitialized warns from opac-memberentry > >Especially line 500 (current master). > >Use of uninitialized value $new_data{"sort2"} in string eq at /usr/share/koha/opac/opac-memberentry.pl line 500. >Use of uninitialized value in string eq at /usr/share/koha/opac/opac-memberentry.pl line 500. > >Simple fix, not completely trivial due to adding xor ;) > >Test plan: >Do not apply, update from opac memberentry. Check warns in log. >Apply patch, update again. Less warns? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > opac/opac-memberentry.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 391a78f8e0..48054f3ca2 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -497,7 +497,8 @@ sub DelUnchangedFields { > > > foreach my $key ( keys %new_data ) { >- if ( ($current_data->{$key} eq $new_data{$key}) || $hidden_fields->{$key} ) { >+ next if defined($new_data{$key}) xor defined($current_data->{$key}); >+ if ( !defined($new_data{$key}) || $current_data->{$key} eq $new_data{$key} || $hidden_fields->{$key} ) { > delete $new_data{$key}; > } > } >-- >2.21.1 (Apple Git-122.3)
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 24892
:
100955
|
100967
|
101055
| 101115