Bugzilla – Attachment 1456 Details for
Bug 3600
Noisy error in rebuild_zebra.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for this bug
0001--Bug-3600-Handle-null-or-empty-to-Charset-StripNon.patch (text/plain), 1.10 KB, created by
Chris Cormack
on 2009-09-10 15:19:00 UTC
(
hide
)
Description:
Patch for this bug
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-09-10 15:19:00 UTC
Size:
1.10 KB
patch
obsolete
>From f7718b331c099b394a3dff07dd5c12eeba3f5619 Mon Sep 17 00:00:00 2001 >From: J. David Bavousett <dbavousett@ptfs.com> >Date: Thu, 10 Sep 2009 11:12:20 -0400 >Subject: [PATCH] [Bug 3600] Handle null-or-empty to Charset::StripNonXmlChars > >When rebuild_zebra.pl is run from cron, there is an occasional error >of the form: > >Use of uninitialized value $str in substitution (s///) at /home/ebpl/kohaclone/C4/Charset.pm line 304. > >This error is occuring when the string that is fed to Charset::StripNonXmlChars >is null or undefined, for some reason. > >This fix will handle the null-or-empty condition, and thus suppress the error. >--- > C4/Charset.pm | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > >diff --git a/C4/Charset.pm b/C4/Charset.pm >index bbeef24..65da33a 100644 >--- a/C4/Charset.pm >+++ b/C4/Charset.pm >@@ -301,6 +301,9 @@ to work, at the possible risk of some data loss. > > sub StripNonXmlChars { > my $str = shift; >+ if (!defined($str) || $str eq ""){ >+ return ""; >+ } > $str =~ s/[^\x09\x0A\x0D\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g; > return $str; > } >-- >1.5.6.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 3600
: 1456