diff --git a/assets/php/contact_form.php b/assets/php/contact_form.php index c2fb857..9b2c73c 100644 --- a/assets/php/contact_form.php +++ b/assets/php/contact_form.php @@ -33,7 +33,7 @@ function prepare_message_body(string $message, string $name) { * mail(): Braucht auf dem Server einen korrekt konfigurierten Mailserver * phpmailer: Bibliothek, der per Composer installiert wird. Tut ganz gut mit SMTP. */ -function send_message_to_office($subject, $message, $name, $email) { +function send_message_to_office(string $subject, string $message, string $name, string $email) { return mail( getenv('WTF_CONTACT_TO'), "=?UTF-8?B?" . base64_encode($subject) . "?=", @@ -48,7 +48,7 @@ function send_message_to_office($subject, $message, $name, $email) { ); } -function send_response($response_data) { +function send_response(array $response_data) { $json = json_encode($response_data); if ($json === false) { // Avoid echo of empty string (which is invalid JSON), and