aboutsummaryrefslogtreecommitdiff
path: root/controllers/mail.controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/mail.controller.php')
-rw-r--r--controllers/mail.controller.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/controllers/mail.controller.php b/controllers/mail.controller.php
index f850ed7..262f999 100644
--- a/controllers/mail.controller.php
+++ b/controllers/mail.controller.php
@@ -2,15 +2,11 @@
$submit = new Form();
-$submit->name = $_POST['26471'];
-$submit->email = $_POST['26472'];
-$submit->message = $_POST['26478'];
+$submit->name = $_POST['26471'] ?? null;
+$submit->email = $_POST['26472'] ?? null;
+$submit->message = $_POST['26478'] ?? null;
-$spam = false;
-
-if (isset($_POST['contact'])) {
- $spam = $_POST['contact'];
-}
+$spam = $_POST['contact'] ?? false;
if ((bool) $spam == true) {
http_response_code(403);