Bugzilla – Attachment 5986 Details for
Bug 6253
Unified Patron Search subroutine
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed followup patch
0001-Bug-6253-followup-explicitly-check-ref-value-for-ARR.patch (text/plain), 1.18 KB, created by
Ian Walls
on 2011-10-19 15:51:32 UTC
(
hide
)
Description:
Proposed followup patch
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2011-10-19 15:51:32 UTC
Size:
1.18 KB
patch
obsolete
>From 25cf411f172da292d9ffe564b5d17f8a20f0dd71 Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Wed, 19 Oct 2011 11:46:21 -0400 >Subject: [PATCH] Bug 6253 followup: explicitly check ref value for ARRAY before casting > >in C4::SQLHelper::_Process_Operands, $operand has been modified to be cast as an array ref >if the incoming $operand is not a ref. However, the incoming $operand could be some other >kind of ref (hashref for example), which would case the dereferencing in line 419 to fail and exit. > >Adding an explicit test for whether the ref is ARRAY seems to clear up this issue. > >To test, run t/db_dependent/Members.t. Before, it fails after test 3. After, it completes all tests. >--- > C4/SQLHelper.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/SQLHelper.pm b/C4/SQLHelper.pm >index 720dc99..285f7d2 100644 >--- a/C4/SQLHelper.pm >+++ b/C4/SQLHelper.pm >@@ -415,7 +415,7 @@ sub _Process_Operands{ > my @tmpkeys; > my @localkeys; > >- $operand = [$operand] unless ref $operand; >+ $operand = [$operand] unless ref $operand eq 'ARRAY'; > foreach (@$operand) { > push @tmpkeys, " $field = ? "; > push @values, $_; >-- >1.7.4.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 6253
:
5025
|
5031
|
5490
|
5529
|
5540
|
5624
|
5632
| 5986