Bugzilla – Attachment 13358 Details for
Bug 8880
Uninitialized variable triggers error log entry in circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8880 - Uninitialized variables trigger error log entries
Bug-8880---Uninitialized-variables-trigger-error-l.patch (text/plain), 2.27 KB, created by
Kyle M Hall (khall)
on 2012-11-09 15:50:10 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8880 - Uninitialized variables trigger error log entries
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-11-09 15:50:10 UTC
Size:
2.27 KB
patch
obsolete
>From 906f14371caf1b3a9d66d9a2c68bab5dcf4460de Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 5 Oct 2012 20:33:47 +0800 >Subject: [PATCH] Bug 8880 - Uninitialized variables trigger error log entries >Content-Type: text/plain; charset="utf-8" > >Simply by logging in, clicking Circulation, clicking the >'Check out' link, error log entries were generated. > >This patch ensures $findborrower, $barcode, and $print are all >initialized by adding "|| q{}" onto their initializations. >This reduces the silent error log entries generated. > >As this patch would overlap with bug 8826 in the initialization >of hashes to prevent other error logs, those changes are in this >patch. Applying this patch without having applied the patch for >bug 8826. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > circ/circulation.pl | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 2a6214a..91fd1a2 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -101,7 +101,7 @@ my @failedreturns = $query->param('failedreturn'); > our %return_failed = (); > for (@failedreturns) { $return_failed{$_} = 1; } > >-my $findborrower = $query->param('findborrower'); >+my $findborrower = $query->param('findborrower') || q{}; > $findborrower =~ s|,| |g; > my $borrowernumber = $query->param('borrowernumber'); > >@@ -122,7 +122,7 @@ if (C4::Context->preference("UseTablesortForCirc")) { > $template->param(UseTablesortForCirc => 1); > } > >-my $barcode = $query->param('barcode') || ''; >+my $barcode = $query->param('barcode') || q{}; > $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace > > $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); >@@ -131,7 +131,7 @@ my $duedatespec = $query->param('duedatespec') || $session->param('stickydu > my $issueconfirmed = $query->param('issueconfirmed'); > my $cancelreserve = $query->param('cancelreserve'); > my $organisation = $query->param('organisations'); >-my $print = $query->param('print'); >+my $print = $query->param('print') || q{}; > my $newexpiry = $query->param('dateexpiry'); > my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice > >-- >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 8880
:
12704
|
12706
| 13358