Bug 10728: fix log noise generated by subscription-renew.pl
authorColin Campbell <colin.campbell@ptfs-europe.com>
Wed, 14 Aug 2013 14:26:34 +0000 (15:26 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 19 Aug 2013 14:10:38 +0000 (14:10 +0000)
commit27edb618dd604e0a718f43e98ed97255f72eb515
treedc8d45a75558a4c26be71037d49c60d9619e864f
parent971449866fc23ff9c0c083754e4dd9c53d8d4cdc
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>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
serials/subscription-renew.pl