Bugzilla – Attachment 100967 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.40 KB, created by
Marcel de Rooy
on 2020-03-18 14:47:53 UTC
(
hide
)
Description:
Bug 24892: Resolve uninitialized warns from opac-memberentry
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-03-18 14:47:53 UTC
Size:
1.40 KB
patch
obsolete
>From 33cd58c6085d52e47baf961d98d914e042ceaf09 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 >Content-Type: text/plain; charset=utf-8 > >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> >--- > 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.11.0
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