Bugzilla – Attachment 163986 Details for
Bug 36438
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 36438: Check object for calling metadata
Bug-36438-Check-object-for-calling-metadata.patch (text/plain), 1.21 KB, created by
Marcel de Rooy
on 2024-03-27 12:24:48 UTC
(
hide
)
Description:
Bug 36438: Check object for calling metadata
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-03-27 12:24:48 UTC
Size:
1.21 KB
patch
obsolete
>From 89c0a28167787a1a157c33961901f5e2eb175d3f Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 27 Mar 2024 12:19:34 +0000 >Subject: [PATCH] Bug 36438: Check object for calling metadata >Content-Type: text/plain; charset=utf-8 > >Resolve: Can't call method "metadata" on an undefined value at catalogue/MARCdetail.pl line 93 > >The proceeding lines check for $record and respond appropriately. > >Test plan: >Call catalogue/MARCdetail.pl with an unexisting biblionumber. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > catalogue/MARCdetail.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl >index 3f5e03a090..0b7f470b22 100755 >--- a/catalogue/MARCdetail.pl >+++ b/catalogue/MARCdetail.pl >@@ -90,7 +90,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > ); > > my $biblio_object = Koha::Biblios->find( $biblionumber ); # FIXME Should replace $biblio >-my $record = $biblio_object->metadata->record({ embed_items => 1 }); >+my $record; >+$record = $biblio_object->metadata->record({ embed_items => 1 }) if $biblio_object; > > if ( not defined $record ) { > # biblionumber invalid -> report and 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 36438
:
163986
|
164688