Bug 24892

Summary: Resolve some warnings in opac-memberentry
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: OPACAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: 1joynelson, hayleypelham, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05, 19.05.10
Attachments: Bug 24892: Resolve uninitialized warns from opac-memberentry
Bug 24892: Resolve uninitialized warns from opac-memberentry
Bug 24892: Resolve uninitialized warns from opac-memberentry
Bug 24892: Resolve uninitialized warns from opac-memberentry

Description Marcel de Rooy 2020-03-18 13:53:43 UTC
Resolve things like:

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.
Use of uninitialized value $new_data{"overdrive_auth_token"} 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.
Use of uninitialized value 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.
Use of uninitialized value 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.
Use of uninitialized value $new_data{"streettype"} 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.
Comment 1 Marcel de Rooy 2020-03-18 13:58:08 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2020-03-18 13:58:39 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2020-03-18 14:47:53 UTC
Created attachment 100967 [details] [review]
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>
Comment 4 Owen Leonard 2020-03-19 17:39:45 UTC
Created attachment 101055 [details] [review]
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>
Comment 5 Marcel de Rooy 2020-03-20 07:38:06 UTC
(In reply to Owen Leonard from comment #4)
> Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Thanks Owen
Comment 6 Kyle M Hall 2020-03-20 13:45:58 UTC
Created attachment 101115 [details] [review]
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>
Comment 7 Martin Renvoize 2020-03-20 15:43:56 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-04-03 21:21:27 UTC
backported to 19.11.x for 19.11.05
Comment 9 Lucas Gass 2020-04-13 19:56:10 UTC
backported to 19.05.x for 19.05.10
Comment 10 Hayley Pelham 2020-04-15 23:38:14 UTC
Minor patch will not be backported to 18.11.x series.