Add some null checking -- if the string is undefined, then turn it into the empty string. This avoids many undefined value warnings when the data provided by the user is incomplete.

This commit is contained in:
ian%hixie.ch 2002-05-26 15:02:33 +00:00
parent f5ec789f5f
commit 8ffd16f0b1

View File

@ -73,6 +73,7 @@ sub splitArguments {
my $value = $2;
# decode the strings
foreach my $string ($name, $value) {
if (defined($string)) {
$string =~ tr/+/ /; # convert + to spaces
$string =~ s/% # a percent symbol
( # followed by
@ -80,6 +81,9 @@ sub splitArguments {
) # which we shall put in $1
/chr(hex($1)) # and convert back into a character
/egox; # (evaluate, globally, optimised, with comments)
} else {
$string = '';
}
}
$self->addArgument($name, $value);
} else {