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)
committerChris Hall <followingthepath@gmail.com>
Mon, 21 Oct 2013 19:43:58 +0000 (08:43 +1300)
commitf2a5af88e7cecce39a7fb3ad4775bb7fa0f9e956
tree85f3e63937407e0af6b8a1538056a6bab68c5487
parent4b7a656f4a7545a2e9387b2548d64188fdd8a1b4
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>
(cherry picked from commit 27edb618dd604e0a718f43e98ed97255f72eb515)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 70681a47f2cefcdee665d4d8076f3228eee891de)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 70681a47f2cefcdee665d4d8076f3228eee891de)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit f17210a19c9727a4c30f3d40a94d4649f39f557e)
serials/subscription-renew.pl