Bugzilla – Attachment 10623 Details for
Bug 8349
Attempted string substitution in C4::Breeding fails on undefined
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Moved the substitution inside the if statement
0001-Bug-8349-Attempted-string-substitution-in-C4-Breedin.patch (text/plain), 1.13 KB, created by
Mark Tompsett
on 2012-07-03 11:23:50 UTC
(
hide
)
Description:
Moved the substitution inside the if statement
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2012-07-03 11:23:50 UTC
Size:
1.13 KB
patch
obsolete
>From 6a414548fbcc2b4768afee38a133482c396badea Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 3 Jul 2012 19:02:08 +0800 >Subject: [PATCH] Bug 8349 - Attempted string substitution in C4::Breeding > fails on undefined By moving the string substitution inside > an existing if statement, the string substitution succeeds. > And if it was null, a string substitution would leave it > null. In the case that it is 0 or '0', it doesn't have > whitespace, and so the substitution doesn't need to be run. >Content-Type: text/plain; charset="utf-8" > >--- > C4/Breeding.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 19bb7e2..0fbc00f 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -179,9 +179,9 @@ sub BreedingSearch { > $query .= "z3950random = ?"; > @bind=($z3950random); > } else { >- $search =~ s/(\s+)/\%/g; > @bind=(); >- if ($search) { >+ if ($search) { >+ $search =~ s/(\s+)/\%/g; > $query .= "title like ? OR author like ?"; > push(@bind,"%$search%", "%$search%"); > } >-- >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 8349
: 10623