Bugzilla – Attachment 141333 Details for
Bug 26648
Prevent internal server error if item attached to old checkout has been removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26648: Prevent explosion in notices on missing item
Bug-26648-Prevent-explosion-in-notices-on-missing-.patch (text/plain), 1.44 KB, created by
Martin Renvoize (ashimema)
on 2022-10-05 09:47:02 UTC
(
hide
)
Description:
Bug 26648: Prevent explosion in notices on missing item
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-10-05 09:47:02 UTC
Size:
1.44 KB
patch
obsolete
>From 516640768a5066a91c6a34e31dcd5157ebe50a95 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 9 Oct 2020 16:13:00 +0100 >Subject: [PATCH] Bug 26648: Prevent explosion in notices on missing item > >The item accessor in Koha::Old::Checkouts could explode given a checkout >where the item had been deleted. > >To test >1/ Edit the issueslip notice to output some item details from the >borrowers old checkouts > >[% FOREACH old_checkout IN borrower.old_checkouts %] > [% IF old_checkout.item %] > [% old_checkout.item.price %] > [% END %] >[% END %] > >2/ Delete the item associated with an old checkout for a test patron >3/ Print the issueslip for the patron >4/ Note a server side error is triggered >5/ Apply the patch >6/ Print the slip again and note the price details for old checkouts are >now displayed >7/ Signoff > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Old/Checkout.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm >index 49a7765485..2967a78afe 100644 >--- a/Koha/Old/Checkout.pm >+++ b/Koha/Old/Checkout.pm >@@ -42,6 +42,7 @@ Return the checked out item > sub item { > my ( $self ) = @_; > my $item_rs = $self->_result->item; >+ return unless $item_rs; > return Koha::Item->_new_from_dbic( $item_rs ); > } > >-- >2.20.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 26648
:
111416
|
111435
|
111804
|
141287
| 141333 |
141334
|
141382