Bugzilla – Attachment 95243 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.17 KB, created by
Bouzid Fergani
on 2019-11-08 21:33:33 UTC
(
hide
)
Description:
Bug 23993: Add check if itemtype exists in IsAvailableForItemLevelRequest
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2019-11-08 21:33:33 UTC
Size:
1.17 KB
patch
obsolete
>From 86e4fe9c196385cb146afea174024acb40b6f284 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 > >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> >Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> >--- > C4/Reserves.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index cf6ee50..372a246 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.7.4
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