diff --git a/src/Mailer/ContactFormManager.php b/src/Mailer/ContactFormManager.php index 0295a853..e9835acf 100644 --- a/src/Mailer/ContactFormManager.php +++ b/src/Mailer/ContactFormManager.php @@ -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;