Skip to content

Commit

Permalink
Item10889: jQuery textboxlist uninitialized warning
Browse files Browse the repository at this point in the history
Usually after a "Warning! Confirmation required"

git-svn-id: http://svn.foswiki.org/branches/Release01x01@11979 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jun 18, 2011
1 parent e284bed commit f3e29d9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions JQueryPlugin/lib/Foswiki/Form/Textboxlist.pm
Expand Up @@ -72,8 +72,13 @@ sub getOptions {
my @values = ();
my @valuesFromQuery = $query->param( $this->{name} );
foreach my $item (@valuesFromQuery) {
foreach my $value ( split( /\s*,\s*/, $item ) ) {
push @values, $value if $value;

# Item10889: Coming from an "Warning! Confirmation required", often
# there's an undef item (the, last, empty, one, <-- here)
if ( defined $item ) {
foreach my $value ( split( /\s*,\s*/, $item ) ) {
push @values, $value if defined $value;
}
}
}

Expand Down

0 comments on commit f3e29d9

Please sign in to comment.