Hi,

I am having a issue when viewing an order using the UC Node Checkout:

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/dev/public_html/sites/all/modules/token/token.module on line 359.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home/dev/public_html/sites/all/modules/token/token.module on line 362.
warning: array_values() [function.array-values]: The argument should be an array in /home/dev/public_html/sites/all/modules/token/token.module on line 363.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/dev/public_html/sites/all/modules/token/token.module on line 263.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/dev/public_html/sites/all/modules/token/token.module on line 264.
warning: Invalid argument supplied for foreach() in /home/dev/public_html/sites/all/modules/token/token.module on line 430.

I was able to locate the code creating the issue (line 842) in the module file:

$arg1->products[$i]->data['attributes'][token_replace($attribute, 'node', $node)] = token_replace($option, 'node', $node);

and the part of the code creating the error is "[token_replace($attribute, 'node', $node)]" if I supress the error adding @ in from of it (like [@token_replace($attribute, 'node', $node)]) the error is gone.

Also if in the node checkout settings I disable the "Display a node teaser as an attribute/option combination for nodes on orders." the error is also gone without having to hack the code.

Thank you,
Emil

Comments

emilorol’s picture

This issue is mention here: http://drupal.org/node/1131406#comment-4465090, but I couldn't find a work around for it.

erik2e’s picture

Searching for a fix for this issue, I found a patch in the Token module issue queue : http://drupal.org/node/886200#comment-3924720

The patch seems to fix the issue in my case.

Ovation1357’s picture

I hit this issue too - It seems that it is a bug in Token() and is fixed in Token version 6.x-1.18

tr’s picture

Status: Active » Fixed
Issue tags: -bug, -token

#2 and #3 indicate this issue is fixed.

Status: Fixed » Closed (fixed)

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