Skip to content

Commit

Permalink
Handle case where value is null
Browse files Browse the repository at this point in the history
  • Loading branch information
camspiers committed Aug 28, 2014
1 parent 2a663c8 commit 86b54d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/HoneyPotField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class HoneyPotField extends TextField

public function validate($validator)
{
if ($this->value !== '') {
if (!(is_null($this->value) || $this->value === '')) {
$validator->validationError(
$this->name,
"This field should not be completed",
Expand Down

0 comments on commit 86b54d1

Please sign in to comment.