From 585e7479870e68587f33590626bd50a58e9f62e0 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 16 Jan 2013 08:12:31 -0800 Subject: [PATCH 3/3] Bug 9312: fix a couple more uninitialized variable warnings --- tools/picture-upload.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index 25166e1..bead4d7 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 @@ -230,6 +230,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.10.4