From 00e9c4e0b6728097b838b7cc47a8a60e69aefea0 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:54:17 +0800 Subject: [PATCH] define the variable so the null coalesce isn't needed --- modules/mfa/public/send-manager-mfa.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/mfa/public/send-manager-mfa.php b/modules/mfa/public/send-manager-mfa.php index 298e596..ed90a68 100644 --- a/modules/mfa/public/send-manager-mfa.php +++ b/modules/mfa/public/send-manager-mfa.php @@ -23,6 +23,7 @@ $logger = LoggerFactory::getAccordingToState($state); +$errorMessage = null; if (filter_has_var(INPUT_POST, 'send')) { try { Mfa::sendManagerCode($state, $logger); @@ -41,7 +42,7 @@ $t = new Template($globalConfig, 'mfa:send-manager-mfa'); $t->data['manager_email'] = $state['managerEmail']; -$t->data['error_message'] = $errorMessage ?? null; +$t->data['error_message'] = $errorMessage; $t->send(); $logger->info(json_encode([