Summary: | keys omitted in check for system preference override | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | SIP2 | Assignee: | Colin Campbell <colin.campbell> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, jonathan.druart, joonas.kylmala, kyle, martin.renvoize, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.05,20.05.11
|
|
Circulation function: | |||
Bug Depends on: | 20954 | ||
Bug Blocks: | |||
Attachments: |
patch to extract keys only for loop
Bug 28052 Do not check SYSENV values only keys in loop Bug 28052 Do not check SYSENV values only keys in loop |
Description
Colin Campbell
2021-03-30 11:12:30 UTC
Created attachment 118990 [details] [review] patch to extract keys only for loop Very trivial patch. loop body only concerned with keys, should not be looking at values omission of keys was probably a typo in original patch *** Bug 25993 has been marked as a duplicate of this bug. *** Created attachment 119000 [details] [review] Bug 28052 Do not check SYSENV values only keys in loop Loop is only interested in key values, because 'keys' is omitted it is checking values as well. This can lead to misleading errors being logged (e.g. key is undefined) Extract keys only to loop array as in the other loops below this Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 119010 [details] [review] Bug 28052 Do not check SYSENV values only keys in loop Loop is only interested in key values, because 'keys' is omitted it is checking values as well. This can lead to misleading errors being logged (e.g. key is undefined) Extract keys only to loop array as in the other loops below this Testing: 1 - tail /var/lib/koha/kohadev/sip-output.log 2 - in another tab use the sip cli tester: perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m checkin --item CHESS1 3 - Note errors: Use of uninitialized value $key in index at /kohadevbox/koha/C4/SIP/Sip/MsgType.pm line 337, <STDIN> line 1. Use of uninitialized value $key in index at /kohadevbox/koha/C4/SIP/Sip/MsgType.pm line 337, <STDIN> line 2. 4 - Apply patch and restart all the things 5 - Repeat 2 6 - Errors mentioned are gone Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.05 Pushed to 20.05.x for 20.05.11 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |