Bug 10728 - subscription-renew generates unnecessary warnings in logs
Summary: subscription-renew generates unnecessary warnings in logs
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Colin Campbell
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-14 14:21 UTC by Colin Campbell
Modified: 2015-06-04 23:23 UTC (History)
6 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:
Circulation function:


Attachments
Proposed patch (1.36 KB, patch)
2013-08-14 14:33 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 10728: fix log noise generated by subscription-renew.pl (1.69 KB, patch)
2013-08-14 14:55 UTC, Galen Charlton
Details | Diff | Splinter Review
bug 10728: fix additional log noise generated by subscription-renew.pl (1.19 KB, patch)
2013-08-14 14:55 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 10728: fix log noise generated by subscription-renew.pl (1.75 KB, patch)
2013-08-19 13:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
bug 10728: fix additional log noise generated by subscription-renew.pl (1.25 KB, patch)
2013-08-19 13:56 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2013-08-14 14:21:54 UTC
subscription-renew.pl generates warnings in the logs if mode is undefined, set a default value to cut down the noise. Can use the mode variable which is otherwise created for no reason
Comment 1 Colin Campbell 2013-08-14 14:33:08 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2013-08-14 14:55:05 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2013-08-14 14:55:10 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-08-19 13:56:05 UTC
Created attachment 20462 [details] [review]
Bug 10728: fix log noise generated by subscription-renew.pl

Error log is showing warnings because mode is undefined
and we are doing string comparisons on it.

Set it to a default value (we were already assigning it a variable
which we were not using) and use the the result in the comparison

To test, after applying the patch:

[1] Use the renew link from the subscription detail page to renew
    a subscription.
[2] Verifying that doing this did not add a warning containing
    'subscription-renew.pl: Use of uninitialized value $mode in string eq '
    to the Apache error log.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jonathan Druart 2013-08-19 13:56:09 UTC
Created attachment 20463 [details] [review]
bug 10728: fix additional log noise generated by subscription-renew.pl

To test:

[1] Use the renew link to bring up the subscription renewal form.
[2] Verify that a warning message containing the text
    'Problem = a value of 1 has been passed to param without key'
    was not added to the Apache error log.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Galen Charlton 2013-08-19 14:11:15 UTC
Pushed to master.  Thanks, Colin!
Comment 7 Tomás Cohen Arazi (tcohen) 2013-09-13 14:37:14 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Colin!
Comment 8 Bernardo Gonzalez Kriegel 2013-09-15 01:41:47 UTC
Pushed to 3.10.x, will be in 3.10.11
Comment 9 Chris Hall 2013-10-21 19:44:31 UTC
Pushed to 3.8.x, will be in 3.8.19
Comment 10 Chris Hall 2013-11-22 21:55:25 UTC
First patch was in 3.8.19, second patch will be in 3.8.20.