Bugzilla – Attachment 12783 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]
[SIGNED-OFF] Bug 8905: Error when accessing invalid authority
Bug-8905-Error-when-accessing-invalid-authority.patch (text/plain), 1.10 KB, created by
Kyle M Hall (khall)
on 2012-10-12 13:35:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8905: Error when accessing invalid authority
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-10-12 13:35:21 UTC
Size:
1.10 KB
patch
obsolete
>From 7e9978814893541bc205a7f03a8e2c8e38e1d190 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 >Content-Type: text/plain; charset="utf-8" > >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. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/AuthoritiesMarc.pm | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >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.2.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