Bugzilla – Attachment 44263 Details for
Bug 14627
GetAuthorisedValueByCode does not handle undef intelligently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 14627: Check for undef passed to GetAuthorisedValueByCode
SIGNED-OFF-Bug-14627-Check-for-undef-passed-to-Get.patch (text/plain), 1.03 KB, created by
Bernardo Gonzalez Kriegel
on 2015-10-31 00:22:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 14627: Check for undef passed to GetAuthorisedValueByCode
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-10-31 00:22:21 UTC
Size:
1.03 KB
patch
obsolete
>From 30d15e764ca91b655cb6f8557ea08009f1d48403 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Fri, 31 Jul 2015 15:05:27 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 14627: Check for undef passed to > GetAuthorisedValueByCode > >Dont prepare or execute unnecessary sql if passed an undef value >routine is used in various places that dont check if the value >returned from a nullable field is defined or not >(e.g. streettype in the borrower record which many sites do not use) > >Lets save those cpu cycles for something useful > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > C4/Koha.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 0a90bb3..052147e 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -1337,6 +1337,9 @@ by the passed category and code > > sub GetAuthorisedValueByCode { > my ( $category, $authvalcode, $opac ) = @_; >+ if (!defined $authvalcode) { >+ return; >+ } > > my $field = $opac ? 'lib_opac' : 'lib'; > my $dbh = C4::Context->dbh; >-- >1.9.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 14627
:
41266
|
43090
|
43091
| 44263 |
44264