After fixing the problem in http://drupal.org/node/926516, I checked the ststus report and found this:

Warning: Invalid argument supplied for foreach() in token_find_duplicate_tokens() (line 636 of /var/www/clients/client2/web2/web/sites/all/modules/token/token.module)

Also:

Duplicate tokens	The following tokens are defined by multiple modules and may cause problems when performing token replacement.

    * node:node-url (defined by modules: token, notifications_content)

I get what it's saying, I just can't seem to make it go away.

Comments

dave reid’s picture

wxman’s picture

You're right that did fix the second part. I'm still getting the first error though.

jcmarco’s picture

Status: Active » Needs review
StatusFileSize
new502 bytes

There are modules that return empty arrays when queried for tokens type 'all' (sms_user, signup, signup_status..)
and there are others buggy modules than not return even anything (location_cck)

So for the first bug, it would be needed an extra check in the token_find_duplicate_tokens().

There is room for an extra future feature maybe some warning for buggy modules using the token API wrongly.

dave reid’s picture

We should use the same check as module_implements() - if (!isset($module_tokens) || !is_array($module_tokens))

wxman’s picture

That patch worked the trick. No more errors are showing up anywhere now. Thanks.

jcmarco’s picture

StatusFileSize
new542 bytes

Added the extra checks and not stop the module analysis, just jump over the wrong modules.

dave reid’s picture

Status: Needs review » Fixed

Thanks, committed to CVS: http://drupal.org/cvs?commit=430228

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.