Bugzilla – Attachment 14626 Details for
Bug 9312
strict perl for picture-upload.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9312: fix a couple more uninitialized variable warnings
Bug-9312-fix-a-couple-more-uninitialized-variable-.patch (text/plain), 1.46 KB, created by
Galen Charlton
on 2013-01-16 16:18:51 UTC
(
hide
)
Description:
Bug 9312: fix a couple more uninitialized variable warnings
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2013-01-16 16:18:51 UTC
Size:
1.46 KB
patch
obsolete
>From 5d3f3c0e473f13b92be46caca0bba0b9d01ae1cb Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Wed, 16 Jan 2013 08:12:31 -0800 >Subject: [PATCH] Bug 9312: fix a couple more uninitialized variable warnings > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > tools/picture-upload.pl | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > >diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl >index 2ed4ef6..bd56b29 100755 >--- a/tools/picture-upload.pl >+++ b/tools/picture-upload.pl >@@ -50,7 +50,7 @@ my $cardnumber = $input->param('cardnumber'); > my $uploadfilename = $input->param('uploadfile'); > my $uploadfile = $input->upload('uploadfile'); > my $borrowernumber = $input->param('borrowernumber'); >-my $op = $input->param('op'); >+my $op = $input->param('op') || ''; > > #FIXME: This code is really in the rough. The variables need to be re-scoped as the two subs depend on global vars to operate. > # Other parts of this code could be optimized as well, I think. Perhaps the file upload could be done with YUI's upload >@@ -233,6 +233,7 @@ sub handle_file { > $debug and warn "Entering sub handle_file; passed \$cardnumber=$cardnumber, \$source=$source"; > $count{filenames} = () if !$count{filenames}; > $count{source} = $source if !$count{source}; >+ $count{count} = 0 unless exists $count{count}; > my %filerrors; > my $filename; > if ( $filetype eq 'image' ) { >-- >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 9312
:
14226
|
14227
|
14255
|
14256
|
14623
|
14624
|
14625
|
14626
|
18895
|
18896
|
18897
|
18936
|
18937
|
18938
|
20548
|
32753
|
32754
|
32755
|
32756
|
32759
|
32760
|
32761
|
32762
|
32781
|
33355
|
33362
|
33363
|
33364
|
33365
|
33366