Closed (fixed)
Project:
Token Variable
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2012 at 19:08 UTC
Updated:
12 Nov 2014 at 13:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
piyuesh23 commentedHi matsbla,
Can you try the deve version of the module and see if this problem is reproducible. I am unable to reproduce this.
Comment #2
lucaslm commentedHi, I'm new to drupal community, although i've known drupal for a while.
Anyway, After debugging it a while I think I know the problem. This page you are acessing lists the variables availables, and for that a function named "_token_var_get_variables", in the file "_token_var_get_variables.inc" is called. this function builds an array named $options, which contains every variable's value shown as strings indexed by the variable's name. When a variable is an array, the function iterates through it for each array position, and creates another entry in $options with it's value. This message is due to the fact than some variables are either arrays within arrays, or objects, so the value (which should be an string) is set as an array or object.
What I did to solve it was changing the condition in line 49 to (!is_array($value) && !is_object($value)) and wrapping lines 57 to 60 with the condition (!is_array($var_value)) and the errors dissapeared.
Comment #3
karenann commentedI had to manually apply the edits to 7.x-1.1 release. Here's a patch file for testing. Second patch, hope I got this right. See also, http://drupal.org/node/1879804#comment-7316380
Comment #4
phayes commentedThanks! committed!
Comment #6
matejmericnjak commentedthe issue is active again in 7.x-1.1 - https://www.drupal.org/node/1570592