From e620f9b5d6c13bcc727791eb930acc81cf5bc47d Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Tue, 21 Apr 2020 13:56:55 +0000 Subject: [PATCH] Bug 25220: make maxoutstanding set to null not give warning on opac-user.pl To test: 1) set maxoutstanding to empty 2) give yourself $1 in fine 3) go to your account on OPAC 4) confirm you have message that holds are blocked 5) apply patch, restart_all 6) reload OPAC 7) confirm message is gone 8) set maxoutstanding to $2 9) reload opac, confirm message is back --- opac/opac-user.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index d94d3d0e2b..de86d4cb9f 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -147,7 +147,8 @@ if ( C4::Context->preference('OpacRenewalAllowed') } my $maxoutstanding = C4::Context->preference('maxoutstanding'); -if ( $amountoutstanding && ( $amountoutstanding > $maxoutstanding ) ){ +$maxoutstanding = undef unless looks_like_number ( $maxoutstanding ); +if ( $amountoutstanding && defined($maxoutstanding) && ( $amountoutstanding > $maxoutstanding ) ){ $borr->{blockedonfines} = 1; } -- 2.11.0