Bugzilla – Attachment 129483 Details for
Bug 29840
opac-reserve explodes if invalid biblionumber is passed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29840: Deal with non-existing biblionumber in opac-reserve
Bug-29840-Deal-with-non-existing-biblionumber-in-o.patch (text/plain), 1.13 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-01-14 14:19:55 UTC
(
hide
)
Description:
Bug 29840: Deal with non-existing biblionumber in opac-reserve
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-01-14 14:19:55 UTC
Size:
1.13 KB
patch
obsolete
>From a75ecffecaa914adf5823fcb95d91201efc3bd10 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Jan 2022 14:02:49 +0100 >Subject: [PATCH] Bug 29840: Deal with non-existing biblionumber in > opac-reserve > >We should not explode if the biblionumber passed in not in DB. > >Test plan: >Hit /cgi-bin/koha/opac-reserve.pl?biblionumber=42424 >and notice the error message. > >Without this patch you got >Can't call method "holds" on an undefined value at >/kohadevbox/koha/opac/opac-reserve.pl line 172 > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > opac/opac-reserve.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 3b6ae8e2a3..99de9a4dcb 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -168,6 +168,8 @@ foreach my $biblioNumber (@biblionumbers) { > > # Compute the priority rank. > my $biblio = Koha::Biblios->find( $biblioNumber ); >+ next unless $biblio; >+ > $biblioData->{object} = $biblio; > my $holds = $biblio->holds; > my $rank = $holds->count; >-- >2.32.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 29840
:
129256
|
129320
| 129483