Hi,
There is an issue with arrays not strings being sent, token_replace_multiple expects $text to be a string....
custom_breadcrumbs.module:

  // Token replacement for titles and paths
  if (module_exists('token')) {
    // Do token replacement.
    $types = custom_breadcrumbs_token_types($objs);
    $titles = token_replace_multiple($titles, $types);
    $paths = token_replace_multiple($paths, $types);
  }
  $items = _custom_breadcrumbs_get_trail_items($breadcrumb, $titles, $paths);

Comments

StephenRobinson’s picture

Title: Issue with Token 6.x-1.17/6.x-1.18 - token_replace_multiple expeacts string not array » Issue with Token 6.x-1.17/6.x-1.18 - token_replace_multiple expects string not array
StephenRobinson’s picture

Token.module:

function token_replace_multiple($text, $types = array('global' => NULL), $leading = TOKEN_PREFIX, $trailing = TOKEN_SUFFIX, $options = array(), $flush = FALSE) {
  // Ensure that the $text parameter is a string and not an array which is an
  // invalid input.
  if (is_array($text)) {
    $backtrace = debug_backtrace();
    foreach ($backtrace as $caller) {
      switch ($caller['function']) {
        case 'token_replace':
        case 'token_replace_multiple':
          continue;
        default:
          trigger_error(t('The @function() function called token replacement with an array rather than a string for $text', array('@function' => $caller['function'])), E_USER_NOTICE);
          break 2;
      }
    }

    foreach ($text as $key => $value) {
      $text[$key] = token_replace_multiple($value, $types, $leading, $trailing, $options, $flush);
    }
    return $text;
  }
lamp5’s picture

Issue summary: View changes
Status: Active » Closed (outdated)