Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
Fix #23 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmenozzi authored Feb 26, 2020
1 parent b8c2c36 commit ca93a86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Validator/Constraints/ContainsRecaptchaValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public function validate($value, Constraint $constraint)
if (!$constraint instanceof ContainsRecaptcha) {
throw new UnexpectedTypeException($constraint, ContainsRecaptcha::class);
}

if ($value === null) {
$value = '';
}

if (!is_string($value)) {
throw new UnexpectedTypeException($value, 'string');
Expand Down

0 comments on commit ca93a86

Please sign in to comment.