Skip to content

Commit 057b9a2

Browse files
mysubcultclaude
andauthored
šŸ› Fix multiple c[...] text variants wiping earlier bot text replacements (#2425)
translateMessage() reused $replaceArray for the params passed to erLhcoreClassGenericBotActionConditions::process() in the c[...] branch, which reset the replacements collected for the preceding identifiers. A message with several {id__text__c[...]} blocks was rendered raw. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9f8573e commit 057b9a2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ā€Žlhc_web/lib/core/lhgenericbot/lhgenericbotworkflow.phpā€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,9 +2761,9 @@ public static function translateMessage($message, $params = array())
27612761
}
27622762

27632763
if (!empty($conditionsRefactored)) {
2764-
$replaceArray = [];
2764+
$conditionReplaceArray = [];
27652765
if (isset($params['args']['replace_array']) && !empty($params['args']['replace_array'])){
2766-
$replaceArray['replace_array'] = $params['args']['replace_array'];
2766+
$conditionReplaceArray['replace_array'] = $params['args']['replace_array'];
27672767
}
27682768

27692769
$response = erLhcoreClassGenericBotActionConditions::process(
@@ -2775,7 +2775,7 @@ public static function translateMessage($message, $params = array())
27752775
'current_trigger' => null
27762776
],
27772777
null,
2778-
$replaceArray
2778+
$conditionReplaceArray
27792779
);
27802780

27812781
if (!(isset($response['status']) && $response['status'] == 'stop')) {

0 commit comments

Comments
Ā (0)