Bugzilla – Attachment 158576 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.12 KB, created by
David Nind
on 2023-11-06 22:18:07 UTC
(
hide
)
Description:
Bug 35266: Fix biblio check in opac-MARCdetail
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-11-06 22:18:07 UTC
Size:
1.12 KB
patch
obsolete
>From 55a065bad32b74c65678e28ed36cabf354e27106 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 > >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> >Signed-off-by: David Nind <david@davidnind.com> >--- > 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