Closed (fixed)
Project:
Menu Views
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Dec 2012 at 04:34 UTC
Updated:
20 Feb 2013 at 18:00 UTC
Notice: Array to string conversion in token_replace() (line 102 of /.../includes/token.inc)
When I have the module enabled I am receiving a notice, suggestions, tips, etc?
Comments
Comment #1
swati.karande commentedHi,
I am not getting these error messages on my local instance.
Is it occouring on php5.4 version?
Comment #2
Christopher Riley commentedI am running on php 5.3.10 on a dev box of mine.
Comment #3
markhalliwellI can tell by the error that you're actually using the 7.x-1.x branch, not the 7.x-2.x branch. I strongly recommend upgrading regardless of any solution that comes out of this. 7.x-1.x receives security fixes only and any fixes applied to Menu Views will happen on the 7.x-2.x branch.
http://drupalcode.org/project/menu_views.git/blob/refs/heads/7.x-1.x:/includes/tokens.inc#l102
Despite the version difference, you'll see that the notice only fires on line 102, which means that the
$valuevariable is initially an object instead of a string. It could be that PHP has some issues with reassigning the variable. I'll keep this issue open and see about putting some stopgap measures for the 7.x-2.x branch in the future.Also keep in mind that this only happens because it's trying to convert data values into a human readable value, which means this would have to be on the admin menu overview form, which also means you have a menu view item in your menu. It might be better to simply pass the object's (i'm guess a node here) ID rather than the node itself ([node:nid] rather than [node]?) and let the view load the object as necessary.
Comment #4
markhalliwellFixed with release of 7.x-2.1 (http://drupal.org/node/1909888)
Comment #5.0
(not verified) commentedUpdated issue summary.