Bugzilla – Attachment 68250 Details for
Bug 19484
Checkout page does not like itemtype NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19484: Add test before using object itemtype
Bug-19484-Add-test-before-using-object-itemtype.patch (text/plain), 1.45 KB, created by
Marcel de Rooy
on 2017-10-18 14:04:43 UTC
(
hide
)
Description:
Bug 19484: Add test before using object itemtype
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-18 14:04:43 UTC
Size:
1.45 KB
patch
obsolete
>From dd7f38f985ad9996d882c9c84d51a7f313397070 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 18 Oct 2017 16:00:34 +0200 >Subject: [PATCH] Bug 19484: Add test before using object itemtype >Content-Type: text/plain; charset=utf-8 > >Resolves this crash: >item-level_itypes set but no itemtype set for item (451) at /usr/share/koha/masterclone/Koha/Schema/Result/Item.pm line 698. >Can't call method "translated_description" on an undefined value at /usr/share/koha/masterclone/svc/checkouts line 168. > >Test plan: >[1] Create/update an item so that it has itemtype NULL. >[2] Check it out on Circulation page. > Before this patch the loading would never stop. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > svc/checkouts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/svc/checkouts b/svc/checkouts >index 98251b5..e42f369 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -171,7 +171,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > author => $c->{author}, > barcode => $c->{barcode}, > itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, >- itemtype_description => $itemtype->translated_description, >+ itemtype_description => $itemtype ? $itemtype->translated_description : q{}, > location => $location, > homebranch => $c->{homebranch}, > itemnotes => $c->{itemnotes}, >-- >2.1.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 19484
:
68250
|
68285
|
68703