Bugzilla – Attachment 98086 Details for
Bug 24529
Uninitialised value warnings in C4::Reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24529: Silence warnings for title level holds
Bug-24529-Silence-warnings-for-title-level-holds.patch (text/plain), 1.36 KB, created by
Jonathan Druart
on 2020-01-29 14:57:55 UTC
(
hide
)
Description:
Bug 24529: Silence warnings for title level holds
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-29 14:57:55 UTC
Size:
1.36 KB
patch
obsolete
>From 637b66ba0d34edddc134ebf589dcc6d97985861e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 29 Jan 2020 13:18:20 +0000 >Subject: [PATCH] Bug 24529: Silence warnings for title level holds > >This patch simply adds a test for itemnumber being defined in the >reserve before comparing it to silence the warning. > >Test plan: >1) Prior to patch, run prove t/db_dependant/Circulation.t and note lots > of `Use of uninitialized value in numeric eq (==) at > /kohadevbox/koha/C4/Reserves.pm line 790` warnings. >2) Apply the patch, re-run the test and note the tests still pass but > the warnings are now gone. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index f2bf8bd5d3..cccd975822 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -787,7 +787,7 @@ sub CheckReserves { > > my $priority = 10000000; > foreach my $res (@reserves) { >- if ( $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) { >+ if ( $res->{'itemnumber'} && $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) { > if ($res->{'found'} eq 'W') { > return ( "Waiting", $res, \@reserves ); # Found it, it is waiting > } else { >-- >2.11.0
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 24529
:
98075
|
98076
| 98086 |
98087