Closed (fixed)
Project:
UC Node Checkout
Version:
6.x-2.0-beta8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2011 at 19:11 UTC
Updated:
10 Feb 2012 at 06:00 UTC
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
Comment #1
emilorol commentedThis issue is mention here: http://drupal.org/node/1131406#comment-4465090, but I couldn't find a work around for it.
Comment #2
erik2e commentedSearching 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.
Comment #3
Ovation1357 commentedI hit this issue too - It seems that it is a bug in Token() and is fixed in Token version 6.x-1.18
Comment #4
tr commented#2 and #3 indicate this issue is fixed.