]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 29 Jun 2020 11:44:05 +0000 (13:44 +0200)
commitcb09303e11b11de2b25852a707211a054fb2b8e1
treec91a5f330aa7e256d7ededc113cbb4957fbfa931
parent5eebfcf68747b4886b23a9d4c8df37ea7d103edb
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>
admin/smart-rules.pl