Skip to content

Commit a062bbd

Browse files
authored
Merge pull request #11 from fritzmg/patch-1
Always replace rim insert tag
2 parents cbb1f89 + b1bd2a2 commit a062bbd

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"source":"https://github.com/menatwork-ia/registration_info_mailer"
3232
},
3333
"require":{
34-
"php":">=5.3",
34+
"php":">=7.0",
3535
"contao/core-bundle":"^3.2 || ^4.4",
3636
"contao-community-alliance/composer-plugin":"^2.4 || ^3.0",
3737
"terminal42/notification_center":"^1.0"

system/modules/registration_info_mailer/src/Handler.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,17 @@ public function sendActivationMail($objUser, $objModule)
183183
*/
184184
public function replaceRimInsertTags($strTag)
185185
{
186-
if (count(self::$arrUserOptions) === 0) {
186+
$arrTemp = explode('::', $strTag);
187+
188+
if ('rim' !== $arrTemp[0]) {
187189
return false;
188190
}
189191

190-
$arrTemp = explode('::', $strTag);
191-
192-
// check if it's our rim insert tag
193-
if ($arrTemp[0] == 'rim' && isset(self::$arrUserOptions[$arrTemp[1]])) {
194-
return self::$arrUserOptions[$arrTemp[1]];
192+
if (empty($arrTemp[1])) {
193+
return '';
195194
}
196195

197-
return false;
196+
return self::$arrUserOptions[$arrTemp[1]] ?? '';
198197
}
199198

200199
/**

0 commit comments

Comments
 (0)