diff --git a/src/Plugin/BusinessRulesItemPluginBase.php b/src/Plugin/BusinessRulesItemPluginBase.php
index b3dfda2..245a7f6 100644
--- a/src/Plugin/BusinessRulesItemPluginBase.php
+++ b/src/Plugin/BusinessRulesItemPluginBase.php
@@ -154,6 +154,12 @@ abstract class BusinessRulesItemPluginBase extends PluginBase implements Busines
           $content = str_replace('{{' . $variable->getId() . '}}', $variable->getValue(), $content);
         }
         elseif (is_array($variable->getValue())) {
+          // Handle the case then content is an empty array. It will cause
+          // warnings if it's not a string for the preg_match_all().
+          if (is_array($content) && empty($content)) {
+            $content = '';
+          }
+
           if (preg_match_all(self::VARIABLE_REGEX, $content)) {
             if ($content == '{{' . $variable->getId() . '}}') {
               $content = $variable->getValue();
@@ -193,7 +199,14 @@ abstract class BusinessRulesItemPluginBase extends PluginBase implements Busines
       if (is_string($setting)) {
         $variables = $event->getArgument('variables');
         $setting = $this->processVariables($setting, $variables);
-        $settings[$key] = $this->util->token->replace($setting, $context, ['clear' => TRUE]);
+
+        $processed = $setting;
+        // Do the token replace only if $setting is not an array because it will
+        // cause warnings.
+        if (!is_array($setting)) {
+          $processed = $this->util->token->replace($setting, $context, ['clear' => TRUE]);
+        }
+        $settings[$key] = $processed;
       }
       elseif (is_array($setting)) {
         $this->processTokenArraySetting($settings[$key], $context, $event);
