]> git.koha-community.org Git - koha.git/commit
Bug 25440: Fix for "uninitialized $maxsuspensiondays" in smart-rules.pl
authorAndrew Nugged <nugged@gmail.com>
Tue, 19 May 2020 08:20:41 +0000 (11:20 +0300)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 13 Jul 2020 17:05:40 +0000 (17:05 +0000)
commit79b90fff2f1ff5091c5a050d880c36be34a36f2e
tree544f192f64e181aef0e92da7e70572b998416fd8
parent84711d3d23874dfc8cc41297b4b0d1a0c550846b
Bug 25440: Fix for "uninitialized $maxsuspensiondays" in smart-rules.pl

This warning emitted:

Use of uninitialized value $maxsuspensiondays in string eq
at /admin/smart-rules.pl line 257.

But that not just undef-warning, there is broken logic,
these two lines are mutually contradictory and goes one-by-one:

    $maxsuspensiondays = undef if $maxsuspensiondays eq q||;
    $maxsuspensiondays = '' if $maxsuspensiondays eq q||;

Fix is simple: to make it '' if it comes undef.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb09303e11b11de2b25852a707211a054fb2b8e1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
admin/smart-rules.pl