When drupal run tests, the token module throw erros instead of warnings when trying to replace multivaluetokens with predifined indexes on non existent data:

  if (!empty($GLOBALS['drupal_test_info']['test_run_id'])) {
    // Only check when tests are running.
    $type_info = token_get_info($type);
    if (!empty($type_info['needs-data']) && !isset($data[$type_info['needs-data']])) {
      trigger_error(t('Attempting to perform token replacement for token type %type without required data', array('%type' => $type)), E_USER_WARNING);
    }
  }

Because of this little thing, i need to patch how multivalue token replacement happens for the entity module

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drkloc’s picture

topicus’s picture

acouch’s picture

Status: Active » Reviewed & tested by the community
fago’s picture

Status: Reviewed & tested by the community » Needs work

Please do not rtbc your own patches. Also, this could need some more context what it is about.

> with predifined indexes on non existent data
No idea what that means.