Skip to content
Browse files

Set default of the empty string to avoid warning of undefined value

  • Loading branch information...
1 parent 65cc40c commit 107713830a86b580e650bbdddf7482ed085446da James committed Jun 27, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Spark/Form/Field/Role/Validateable.pm
View
2 lib/Spark/Form/Field/Role/Validateable.pm
@@ -36,6 +36,8 @@ before 'validate' => sub {
my ($self) = @_;
$self->_clear_errors;
$self->valid(1);
+ #Set a default of the empty string, suppresses a warning
+ $self->value($self->value||'');
};
1;

0 comments on commit 1077138

Please sign in to comment.
Something went wrong with that request. Please try again.