Bugzilla – Attachment 95186 Details for
Bug 23993
Can't call method "notforloan" on an undefined value at C4/Reserves.pm line 1177.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23993: Add check if itemtype exists in IsAvailableForItemLevelRequest
Bug-23993-Add-check-if-itemtype-exists-in-IsAvaila.patch (text/plain), 1.16 KB, created by
Marcel de Rooy
on 2019-11-08 09:18:56 UTC
(
hide
)
Description:
Bug 23993: Add check if itemtype exists in IsAvailableForItemLevelRequest
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-11-08 09:18:56 UTC
Size:
1.16 KB
patch
obsolete
>From 9c4b1d93331488956fc69aaf5cbc5e5a1579f403 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 8 Nov 2019 09:16:53 +0000 >Subject: [PATCH] Bug 23993: Add check if itemtype exists in > IsAvailableForItemLevelRequest >Content-Type: text/plain; charset=utf-8 > >Trivial change > >Test plan: >Run Reserves.t >Import book with unknown item type, try to place hold (with/without patch) > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Reserves.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index cf6ee50169..372a246004 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1174,7 +1174,10 @@ sub IsAvailableForItemLevelRequest { > # or something similar - need to be > # consolidated > my $itemtype = $item->effective_itemtype; >- my $notforloan_per_itemtype = Koha::ItemTypes->find($itemtype)->notforloan; >+ my $itemtypeobj = Koha::ItemTypes->find($itemtype); >+ my $notforloan_per_itemtype = $itemtypeobj >+ ? $itemtypeobj->notforloan >+ : 1; # itype undefined: not for loan > > return 0 if > $notforloan_per_itemtype || >-- >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 23993
:
95186
|
95243