Commit 4cb5f834 authored by Dane Powell's avatar Dane Powell
Browse files

Issue #1329024 by Dane Powell: Fixed notice from Token module.

parent d7b0e675
Loading
Loading
Loading
Loading
+11 −2
Changes for messaging.module: 11 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -894,12 +894,21 @@ function messaging_text_replace($text, $objects) {

  // Use token_logic if available, http://code.developmentseed.org/token_logic
  // Otherwise use standard contrib token module, http://drupal.org/project/token
  $function = 'token_replace_multiple';
  $param_arr = array($text, $objects);
  if (module_exists('token_logic')) {
    return token_logic_replace_multiple($text, $objects);
    $function = 'token_logic_replace_multiple';
  }
  if (is_array($text)) {
    foreach ($text as $part => $line) {
      $param_arr[0] = $line;
      $text[$part] = call_user_func_array($function, $param_arr);
    }
  }
  else {
    return token_replace_multiple($text, $objects);
    $text = call_user_func_array($function, $param_arr);
  }
  return $text;
}

/**