Bugzilla – Attachment 12774 Details for
Bug 8905
Error when accessing invalid authority
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8905: Error when accessing invalid authority
Bug-8905-Error-when-accessing-invalid-authority.patch (text/plain), 1007 bytes, created by
Jared Camins-Esakov
on 2012-10-11 19:04:22 UTC
(
hide
)
Description:
Bug 8905: Error when accessing invalid authority
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-10-11 19:04:22 UTC
Size:
1007 bytes
patch
obsolete
>From f81149c379b8e1b4e4571afdd67fb1e4d9f8fec0 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Thu, 11 Oct 2012 15:05:07 -0400 >Subject: [PATCH] Bug 8905: Error when accessing invalid authority > >The GetAuthority shim does not check that authority retrieval was >successful, and therefore can call ->record on an undefined value. > >This can be reproduced by trying to load an invalid authority record >using bulkmarcimport. There may be other ways to trigger it, but I'm >not sure what they are. >--- > C4/AuthoritiesMarc.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 2671cd4..1a6fb2e 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -856,6 +856,7 @@ Returns MARC::Record of the authority passed in parameter. > sub GetAuthority { > my ($authid)=@_; > my $authority = Koha::Authority->get_from_authid($authid); >+ return unless $authority; > return ($authority->record); > } > >-- >1.7.9.5
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 8905
:
12774
|
12783