Bugzilla – Attachment 6680 Details for
Bug 7330
System preferences editor generates errors in the log with each search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7330 - System preferences editor generates errors in the log with each search
Bug-7330---System-preferences-editor-generates-err.patch (text/plain), 1.78 KB, created by
Liz Rea
on 2011-12-08 20:55:56 UTC
(
hide
)
Description:
Bug 7330 - System preferences editor generates errors in the log with each search
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2011-12-08 20:55:56 UTC
Size:
1.78 KB
patch
obsolete
>From 57fbcccba1cf78a3438dd78628c61b1e3c6a262a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 7 Dec 2011 10:50:06 -0500 >Subject: [PATCH] Bug 7330 - System preferences editor generates errors in the log with each search >Content-Type: text/plain; charset="utf-8" > >Adding a check for an empty value in a couple of places >which seem to always get one. > >As far as I can tell these places in the script are looping >over ALL the data in the pref files, and sometimes an empty >value comes through. I wonder if this is because of a minor >syntax error in the pref file? > >My correction is a stab in the dark since I haven't determined >where the empty value is actually coming from. This change >quiets the errors in the log and doesn't seem to affect >preference search results. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >No more messages in the logs. Yay! > >Ran unit tests on this (t, xt/author, xt, t/db_dependent)- nothing out of the ordinary in any. >--- > admin/preferences.pl | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 055f69d..0dcec19 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -216,6 +216,7 @@ sub SearchPrefs { > > foreach my $piece ( @$line ) { > if ( ref( $piece ) eq 'HASH' ) { >+ if ( !$piece->{'pref'} ){ next; } > if ( $piece->{'pref'} =~ /^$searchfield$/i ) { > my ( undef, $LINES ) = TransformPrefsToHTML( $data, $searchfield ); > >@@ -249,7 +250,7 @@ sub SearchPrefs { > > sub matches { > my ( $text, $terms ) = @_; >- return !grep( { $text !~ /$_/i } @$terms ); >+ if ( $text ) { return !grep( { $text !~ /$_/i } @$terms ); } > } > > my $dbh = C4::Context->dbh; >-- >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 7330
:
6638
| 6680