From 8178640a3bead70d98f71f9eb1c126fd0bec6e66 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:31:07 +0000 Subject: [PATCH] NULL instead of throwing error when a input field does not exist --- FormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FormField.php b/FormField.php index bf5cdf3..8d7a2f5 100644 --- a/FormField.php +++ b/FormField.php @@ -23,6 +23,6 @@ class FormField { } public function loadFromEnv($name) { - $this->value=$_POST[$name]; + $this->value=isset($_POST[$name])?$_POST[$name]:null; } }