diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-02-21 20:55:44 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2019-02-21 21:13:56 -0500 |
commit | 551b4263aaf9543cbdb2547da1e1e99e414d0595 (patch) | |
tree | 2d971bf33831ef32a720b8e2876b4669668e2898 /controllers | |
parent | ebce5944b418e6bef744e0047076dbe262cf3815 (diff) | |
download | edwinmattiacci.com-551b4263aaf9543cbdb2547da1e1e99e414d0595.tar.gz edwinmattiacci.com-551b4263aaf9543cbdb2547da1e1e99e414d0595.tar.bz2 edwinmattiacci.com-551b4263aaf9543cbdb2547da1e1e99e414d0595.zip |
controllers/mail: Set variables if empty
Diffstat (limited to 'controllers')
-rw-r--r-- | controllers/mail.controller.php | 12 |
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); |