Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 107713830a86b580e650bbdddf7482ed085446da 1 parent 65cc40c
James authored
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;
Please sign in to comment.
Something went wrong with that request. Please try again.