Bugzilla – Attachment 164688 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.24 KB, created by
Emily Lamancusa (emlam)
on 2024-04-11 13:17:42 UTC
(
hide
)
Description:
Bug 36438: Check object for calling metadata
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2024-04-11 13:17:42 UTC
Size:
1.24 KB
patch
obsolete
>From c110d3ad7cbbacb26a1e4f1cc14fd60351b80d82 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 > >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> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > 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.34.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 36438
:
163986
| 164688