Bugzilla – Attachment 105995 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
0001-Bug-25533-Fix-for-Argument-isn-t-numeric-warning.patch (text/plain), 1.62 KB, created by
Emmi Takkinen
on 2020-06-18 05:51:37 UTC
(
hide
)
Description:
Bug 25533: Fix for 'Argument "" isn't numeric' warning
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2020-06-18 05:51:37 UTC
Size:
1.62 KB
patch
obsolete
>From 2d0c0e7dd476dfbbc1683e615439994b1685dba5 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> >Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com> >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d328773b01..d8c06ef9d0 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -2205,7 +2205,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