perl-CGI-FormMagick/perl-CGI-FormMagick-0.93-bz10210-uninitialized_what_to_make.patch

31 lines
1.2 KiB
Diff

diff -Nur perl-CGI-FormMagick-0.93.old/lib/CGI/FormMagick/TagMaker.pm perl-CGI-FormMagick-0.93/lib/CGI/FormMagick/TagMaker.pm
--- perl-CGI-FormMagick-0.93.old/lib/CGI/FormMagick/TagMaker.pm 2005-10-31 12:24:02.000000000 -0500
+++ perl-CGI-FormMagick-0.93/lib/CGI/FormMagick/TagMaker.pm 2017-04-05 11:04:34.084000000 -0400
@@ -189,7 +189,7 @@
my $called_sub_name = $1;
my ($tag_name, $what_to_make) = split( '_', $called_sub_name, 2 );
- unless( lc($what_to_make) =~
+ unless( lc($what_to_make||'') =~
/^($TAG_GROUP|$TAG_PAIR|$TAG_START|$TAG_END)$/ ) {
if( $self->{$KEY_AUTO_GROUP} ) {
$what_to_make = $TAG_GROUP;
@@ -203,7 +203,7 @@
my $ra_text = delete( $rh_params->{$PARAM_TEXT} );
my $force_list = delete( $rh_params->{$PARAM_LIST} );
- if( lc($what_to_make) eq $TAG_GROUP ) {
+ if( lc($what_to_make||'') eq $TAG_GROUP ) {
return( $self->make_html_tag_group(
$tag_name, $rh_params, $ra_text, $force_list ) );
}
@@ -311,7 +311,7 @@
sub make_html_tag {
my ($self, $tag_name, $rh_params, $text, $what_to_make) = @_;
$tag_name = lc($tag_name);
- $what_to_make = lc($what_to_make);
+ $what_to_make = lc($what_to_make||'');
$text = defined($text) ? $text : '';
my %tag_params = map { ( lc($_) => $rh_params->{$_} ) }