From dca4fae225e90bd7d5666cfa16df72939c95afa0 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 Signed-off-by: Owen Leonard --- 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 6d967c8803..fb68a7f39e 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -148,7 +148,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