Skip to content

Commit

Permalink
Item9629: After validation, a multi-valued param that has no value ca…
Browse files Browse the repository at this point in the history
…n end up with an undef value. Also committing a debugging enhancement that helps you track down the source of oops exceptions

git-svn-id: http://svn.foswiki.org/trunk@8933 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Sep 6, 2010
1 parent 6dd9a5d commit 6b6b4c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Form/FieldDefinition.pm
Expand Up @@ -239,7 +239,7 @@ sub populateMetaFromQueryData {
if ( $this->isMultiValued() ) {
my @values = $query->param( $this->{name} );

if ( scalar(@values) == 1 ) {
if ( scalar(@values) == 1 && defined $values[0] ) {
@values = split( /,|%2C/, $values[0] );
}
my %vset = ();
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/OopsException.pm
Expand Up @@ -181,7 +181,7 @@ sub stringify {
if ( defined $this->{params} ) {
$s .= ' params=>[' . join( ',', @{ $this->{params} } ) . ']';
}
return $s . ')';
return $s . ')'.((DEBUG)?$this->stacktrace:'');
}
}

Expand Down

0 comments on commit 6b6b4c8

Please sign in to comment.