Bugzilla – Attachment 158518 Details for
Bug 35266
opac-MARCdetail: Can't call method "metadata" on an undefined value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35266: Fix biblio check in opac-MARCdetail
Bug-35266-Fix-biblio-check-in-opac-MARCdetail.patch (text/plain), 1.11 KB, created by
Marcel de Rooy
on 2023-11-06 13:18:00 UTC
(
hide
)
Description:
Bug 35266: Fix biblio check in opac-MARCdetail
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-11-06 13:18:00 UTC
Size:
1.11 KB
patch
obsolete
>From 87dfb224d72e7513464411d0d82af417ea433a78 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 6 Nov 2023 13:11:49 +0000 >Subject: [PATCH] Bug 35266: Fix biblio check in opac-MARCdetail >Content-Type: text/plain; charset=utf-8 > >We should check before retrieving metadata. > >Test plan; >Try /cgi-bin/koha/opac-MARCdetail?biblionumber=X >Replace X by a not-existing biblionumber. >Verify that you get a 404 error page. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > opac/opac-MARCdetail.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 9b85bbbe1e..1ad94ca3be 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -92,8 +92,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $patron = Koha::Patrons->find($loggedinuser); > my $biblio = Koha::Biblios->find($biblionumber); >-my $record = $biblio->metadata->record; > >+my $record; >+$record = $biblio->metadata->record if $biblio; > if ( ! $record ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); > exit; >-- >2.30.2
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 35266
:
158518
|
158576
|
158977