Bug 23034 - Warning when in Mana KB settings Auto subscription sharing is unchecked
Summary: Warning when in Mana KB settings Auto subscription sharing is unchecked
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Mana-kb (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Joonas Kylmälä
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-03 14:53 UTC by Joonas Kylmälä
Modified: 2020-06-04 20:33 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.02


Attachments
0001-Bug-23034-Remove-uninitialized-value-warning-in-Mana (1.48 KB, patch)
2019-06-03 15:17 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 23034: Remove uninitialized value warning in Mana KB settings (1.54 KB, patch)
2019-06-19 11:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23034: Remove uninitialized value warning in Mana KB settings (1.59 KB, patch)
2019-06-21 15:59 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Kylmälä 2019-06-03 14:53:55 UTC
If you go to the page /cgi-bin/koha/admin/share_content.pl and unselect the checkbox "Auto subscription sharing" you will get following warning to plack-error.log: "Use of uninitialized value $auto_share in string ne at /home/koha/kohaclone/admin/share_content.pl line 49."
Comment 1 Joonas Kylmälä 2019-06-03 15:17:41 UTC
Created attachment 90273 [details] [review]
0001-Bug-23034-Remove-uninitialized-value-warning-in-Mana

Here is a patch to remove the warning.
Comment 2 Martin Renvoize 2019-06-19 11:35:44 UTC
Created attachment 90776 [details] [review]
Bug 23034: Remove uninitialized value warning in Mana KB settings

This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.

Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
   subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
   value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
   warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
   is in unselected state after clicking "Save".

Sponsored-by: The National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2019-06-19 11:36:52 UTC
Works well, thanks for the patch.
Comment 4 Nick Clemens 2019-06-21 15:59:19 UTC
Created attachment 90922 [details] [review]
Bug 23034: Remove uninitialized value warning in Mana KB settings

This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.

Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
   subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
   value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
   warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
   is in unselected state after clicking "Save".

Sponsored-by: The National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Martin Renvoize 2019-06-24 13:50:42 UTC
Nice work!

Pushed to master for 19.11.00
Comment 6 Martin Renvoize 2019-06-24 14:48:13 UTC
Nice work!

Pushed to master for 19.11.00
Comment 7 Fridolin Somers 2019-07-16 06:48:26 UTC
Pushed to 19.05.x for 19.05.02
Comment 8 Lucas Gass 2019-07-23 15:18:16 UTC
no backport for 18.11.x