Skip to content

Commit

Permalink
fix: Fixed recursive findEmailData to find "email" key in a complex f…
Browse files Browse the repository at this point in the history
…orm data
  • Loading branch information
ambroisemaupate committed Jan 11, 2023
1 parent 1ea0ad1 commit 44a9a89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mailer/ContactFormManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ protected function findEmailData(array $formData): ?string
filter_var($value, FILTER_VALIDATE_EMAIL)
) {
return $value;
} elseif (is_array($value) && count($value) > 0) {
return $this->findEmailData($value);
} elseif (is_array($value) && null !== $email = $this->findEmailData($value)) {
return $email;
}
}
return null;
Expand Down

0 comments on commit 44a9a89

Please sign in to comment.