From 090c6dfbc78ce51e222af804c3bb623b65c32274 Mon Sep 17 00:00:00 2001 From: Sergiu Teaca Date: Fri, 24 Mar 2017 09:54:00 +0200 Subject: [PATCH] Issue #2863561: List of tokens in Direct Input are not replaced. --- src/Context/ContextHandlerTrait.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Context/ContextHandlerTrait.php b/src/Context/ContextHandlerTrait.php index 9e8e4fd4..d9568d72 100644 --- a/src/Context/ContextHandlerTrait.php +++ b/src/Context/ContextHandlerTrait.php @@ -291,7 +291,15 @@ protected function processData(CoreContextAwarePluginInterface $plugin, Executio $value = $plugin->getContextValue($context_name); foreach ($processors as $processor_plugin_id => $configuration) { $data_processor = $this->processorManager->createInstance($processor_plugin_id, $configuration); - $value = $data_processor->process($value, $rules_state); + if (is_array($value)) { + foreach ($value as $item) { + $values[] = $data_processor->process($item, $rules_state); + } + $value = !empty($values) ? $values : []; + } + else { + $value = $data_processor->process($value, $rules_state); + } } $plugin->setContextValue($context_name, $value); }