Skip to content

Commit

Permalink
Fixed undefined array key warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Jun 14, 2022
1 parent fd07e5a commit c3f24be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/NotificationCenter/ContaoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function sendRegistrationEmail($intId, $arrData, $objModule)
$arrTokens = [];

if (!empty($arrData['activation'])) {
$arrTokens['link'] = \Environment::get('base') . \Environment::get('request') . (($GLOBALS['TL_CONFIG']['disableAlias'] || strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $arrData['activation'];
$arrTokens['link'] = \Environment::get('base') . \Environment::get('request') . ((($GLOBALS['TL_CONFIG']['disableAlias'] ?? false) || strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $arrData['activation'];
}

// Disable the email to admin because no core notification has been sent
Expand Down
2 changes: 1 addition & 1 deletion modules/ModulePasswordNotificationCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function sendPasswordLink($objMember)

$arrTokens['recipient_email'] = $objMember->email;
$arrTokens['domain'] = \Idna::decode(\Environment::get('host'));
$arrTokens['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . (($GLOBALS['TL_CONFIG']['disableAlias'] || strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $token;
$arrTokens['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . ((($GLOBALS['TL_CONFIG']['disableAlias'] ?? false) || strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $token;

$objNotification->send($arrTokens, $GLOBALS['TL_LANGUAGE']);
$this->log('A new password has been requested for user ID ' . $objMember->id . ' (' . $objMember->email . ')', __METHOD__, TL_ACCESS);
Expand Down

0 comments on commit c3f24be

Please sign in to comment.