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
Created attachment 20335 [details] [review] Proposed patch
Created attachment 20337 [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>
Created attachment 20338 [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>
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>
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>
Pushed to master. Thanks, Colin!
This patch has been pushed to 3.12.x, will be in 3.12.5. Thanks Colin!
Pushed to 3.10.x, will be in 3.10.11
Pushed to 3.8.x, will be in 3.8.19
First patch was in 3.8.19, second patch will be in 3.8.20.