Bugzilla – Attachment 105101 Details for
Bug 25533
Perl "not numeric" warning on the "Holds" page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25533: Fix for 'Argument "" isn't numeric' warning
Bug-25533-Fix-for-Argument--isnt-numeric-warning.patch (text/plain), 1.57 KB, created by
Slava Shishkin
on 2020-05-19 14:23:56 UTC
(
hide
)
Description:
Bug 25533: Fix for 'Argument "" isn't numeric' warning
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2020-05-19 14:23:56 UTC
Size:
1.57 KB
patch
obsolete
>From a207bb549a878d8ee8b9332e90b787ce8d6dc033 Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Tue, 19 May 2020 17:21:46 +0300 >Subject: [PATCH] Bug 25533: Fix for 'Argument "" isn't numeric' warning > >Perl warning on the intranet "Holds" page >(/cgi-bin/koha/reserve/request.pl) > >Argument "" isn't numeric in numeric gt (>) >at .../C4/Reserves.pm line 2233. > >Fixed by assigning 0 for $holds_per_record when it has value that can >be considered as false. > >To test: > 1) Ensure that values of "Holds per record" is set to Unlimited > on /cgi-bin/koha/admin/smart-rules.pl > 2) Go to the intranet page (/cgi-bin/koha/reserve/request.pl). > 3) Open item record, like /cgi-bin/koha/reserve/request.pl?biblionumber=1&borrowernumber=1 > 4) Observe the warning in the log file. > 5) Apply patch. > 6) Repeat steps 2 and 3. > 7) Check that previous warning was suppressed. > >Mentored-by: Peter Vashchuk <stalkernoid@gmail.com> >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 9f8d31637a..c7b2442a6e 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -2229,7 +2229,7 @@ sub GetMaxPatronHoldsForRecord { > $branchcode = $item->homebranch if ( $controlbranch eq "ItemHomeLibrary" ); > > my $rule = GetHoldRule( $categorycode, $itemtype, $branchcode ); >- my $holds_per_record = $rule ? $rule->{holds_per_record} : 0; >+ my $holds_per_record = $rule ? $rule->{holds_per_record} || 0 : 0; > $max = $holds_per_record if $holds_per_record > $max; > } > >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25533
:
105101
|
105995