Bugzilla – Attachment 12789 Details for
Bug 8895
Warning in systempreferences.pl: Use of uninitialized value in length...
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length...
Bug-8895---Warning-in-systempreferencespl-Use-of-u.patch (text/plain), 1.90 KB, created by
Kyle M Hall (khall)
on 2012-10-12 14:39:25 UTC
(
hide
)
Description:
Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length...
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-10-12 14:39:25 UTC
Size:
1.90 KB
patch
obsolete
>From 23e0c422c747e9833ac00b9fed3f03fc1ed55d59 Mon Sep 17 00:00:00 2001 >From: Marc Veron <veron@veron.ch> >Date: Wed, 10 Oct 2012 07:49:36 +0200 >Subject: [PATCH] Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length... >Content-Type: text/plain; charset="utf-8" > >Clicking on Local use tab in system preferences results in warning in log file: > >systempreferences.pl: Use of uninitialized value in length at (...)/admin/systempreferences.pl line 456 > >Reason: content field "value" in table "systempreferences" can be NULL (and is tested for length). > >Added test for "defined" at to places. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > admin/systempreferences.pl | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > >diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl >index 175f6a0..41130b2 100755 >--- a/admin/systempreferences.pl >+++ b/admin/systempreferences.pl >@@ -420,6 +420,7 @@ sub StringSearch { > my $sth = $dbh->prepare("Select variable,value,explanation,type,options from systempreferences where (variable like ?) order by variable"); > $sth->execute($syspref); > while ( my $data = $sth->fetchrow_hashref ) { >+ unless (defined $data->{value}) { $data->{value} = "";} > $data->{shortvalue} = $data->{value}; > $data->{shortvalue} = substr( $data->{value}, 0, 60 ) . "..." if defined( $data->{value} ) and length( $data->{value} ) > 60; > push( @results, $data ); >@@ -452,6 +453,7 @@ sub StringSearch { > } > > while ( my $data = $sth->fetchrow_hashref ) { >+ unless (defined $data->{value}) { $data->{value} = "";} > $data->{shortvalue} = $data->{value}; > $data->{shortvalue} = substr( $data->{value}, 0, 60 ) . "..." if length( $data->{value} ) > 60; > push( @results, $data ); >-- >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 8895
:
12752
| 12789