Skip to content

Commit

Permalink
define the variable so the null coalesce isn't needed
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Oct 10, 2024
1 parent 129054f commit 00e9c4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/mfa/public/send-manager-mfa.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

$logger = LoggerFactory::getAccordingToState($state);

$errorMessage = null;
if (filter_has_var(INPUT_POST, 'send')) {
try {
Mfa::sendManagerCode($state, $logger);
Expand All @@ -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([
Expand Down

0 comments on commit 00e9c4e

Please sign in to comment.