Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

JDHEDDEN: lc(undef) reports warning in blead [RT#32742]

Change 33088 in blead causes lc/uc to report warnings if called with
'undef'. This change causes URI/mailto.pm to produce warnings as is
seen below. The attached patch fixes this.
  • Loading branch information...
commit 418bb226ebf4e98210c08da5dd03dd2f642de893 1 parent 0f6fec1
@gisle gisle authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 URI/mailto.pm
View
4 URI/mailto.pm
@@ -14,7 +14,7 @@ sub to
my @new = @old;
# get rid of any other to: fields
for (my $i = 0; $i < @new; $i += 2) {
- if (lc($new[$i]) eq "to") {
+ if (lc($new[$i] || '') eq "to") {
splice(@new, $i, 2);
redo;
}
@@ -51,7 +51,7 @@ sub headers
# strip out any "to" fields
my @to;
for (my $i=0; $i < @new; $i += 2) {
- if (lc($new[$i]) eq "to") {
+ if (lc($new[$i] || '') eq "to") {
push(@to, (splice(@new, $i, 2))[1]); # remove header
redo;
}
Please sign in to comment.
Something went wrong with that request. Please try again.