Hi,
get this error upon upgrade to 6.x-1.17,
Stephen :)
Warning: preg_match_all() expects parameter 2 to be string, array given in token_scan() (line 701 of /www/sr12/www-drupal/drupal.sanger.ac.uk/htdocs/sites/all/modules/contrib/token/token.module).
Comments
Comment #1
stephenrobinson commentedHi,
Heres the debug:
Comment #2
stephenrobinson commentedHi,
Can be fixed like this:
Comment #3
MasterChief commentedSame problem.
The patch in #2 works.
Comment #4
jdln commentedIm having the same issue. How do I apply the solution from #2? Do I add that code to token.module?
Thanks
Comment #5
dave reidThis needs to be fixed in modules calling token_replace() as they should not be providing an array here. See #1307890: token_replace() performance when there are no tokens.
Comment #6
aitala commentedActually this sounds like its a PHP5.3 issue… and my webhost will not de-grade to 5.2.
Eric
Comment #7
dave reidI have added some debugging code to 6.x-1.x-dev release that will help trace what function is responsible for calling this incorrectly. Please download the 6.x-1.x-dev release in about 12 hours to help me debug this further.
Comment #8
fzipi commentedThe custom_breadcrumbs_nodeapi() function called token replacement with an array rather than a string for $text in /var/www/drupal/sites/all/modules/token/token.module on line 263.
See http://drupal.org/node/1327960. Applied their patch, and solved.
Comment #9
Marko B commentedreporting the same problem on 6.18 and 5.2 php, went back to 6.16 and there is no problem.