summaryrefslogtreecommitdiff
path: root/lib/CGI.pm
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-08-17 15:28:36 +0000
committerSteve Peters <steve@fisharerojo.org>2006-08-17 15:28:36 +0000
commitc68480ca39f58e0c7bce1d278886ddf251baa5f7 (patch)
treecdc80a7b599b87cd8ccb7905ee38505746ef2042 /lib/CGI.pm
parent063df69cb51d4f97ff5708b58e83b514bdd27cb7 (diff)
downloadperl-c68480ca39f58e0c7bce1d278886ddf251baa5f7.tar.gz
Fix to problem where CGI can lose the filehandle during an upload.
Patch posted to the Debian bug list by Eric Wong <eric@petta-tech.com>. p4raw-id: //depot/perl@28732
Diffstat (limited to 'lib/CGI.pm')
-rw-r--r--lib/CGI.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CGI.pm b/lib/CGI.pm
index 3547a78f85..15f1be56c2 100644
--- a/lib/CGI.pm
+++ b/lib/CGI.pm
@@ -19,7 +19,7 @@ use Carp 'croak';
# http://stein.cshl.org/WWW/software/CGI/
$CGI::revision = '$Id: CGI.pm,v 1.208 2006/04/23 14:25:14 lstein Exp $';
-$CGI::VERSION='3.20';
+$CGI::VERSION='3.20_01';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -3416,7 +3416,7 @@ END_OF_FUNC
'upload' =><<'END_OF_FUNC',
sub upload {
my($self,$param_name) = self_or_default(@_);
- my @param = grep(ref && fileno($_), $self->param($param_name));
+ my @param = grep(ref && defined(fileno($_)), $self->param($param_name));
return unless @param;
return wantarray ? @param : $param[0];
}