Bugzilla – Attachment 95251 Details for
Bug 23785
Software error Can't call method "get_coins" on an undefined value at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 692.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23785: Fix call get_coins on undef value in opac-search.pl
Bug-23785-Fix-call-getcoins-on-undef-value-in-opac.patch (text/plain), 1.26 KB, created by
Jonathan Druart
on 2019-11-11 09:16:13 UTC
(
hide
)
Description:
Bug 23785: Fix call get_coins on undef value in opac-search.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-11 09:16:13 UTC
Size:
1.26 KB
patch
obsolete
>From 6e28768bdde28eda47e1aaed4afa086f6e26558b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 11 Nov 2019 10:14:14 +0100 >Subject: [PATCH] Bug 23785: Fix call get_coins on undef value in > opac-search.pl > >If the search engine index returns a record that is no longer in the DB, >an OPAC search will explode with: > Can't call method "get_coins" on an undefined value at > /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 692. >--- > opac/opac-search.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index ea78ca0b23..105331009f 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -691,7 +691,7 @@ for (my $i=0;$i<@servers;$i++) { > > if (C4::Context->preference('COinSinOPACResults')) { > my $biblio = Koha::Biblios->find( $res->{'biblionumber'} ); >- $res->{coins} = $biblio->get_coins; >+ $res->{coins} = $biblio ? $biblio->get_coins : q{}; # FIXME This should be moved at the beginning of the @newresults loop > } > if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) { > if( my $isbn = Business::ISBN->new( $res->{normalized_isbn} ) ) { >-- >2.11.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 23785
:
95251
|
96083