#125_fehler_im_kontaktformular #126

Merged
muli merged 8 commits from #125_fehler_im_kontaktformular into main 2022-08-24 22:41:22 +02:00
Showing only changes of commit 590cbfbb65 - Show all commits

View File

@ -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