Active
Project:
Theme developer
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Jan 2010 at 14:01 UTC
Updated:
19 May 2010 at 16:58 UTC
Jump to comment: Most recent
Hi
I get the following warning on a panels contactpage.
Invalid argument supplied for foreach() in /home/aromakok/domains/aromakok.se/public_html/sites/all/modules/ctools/plugins/content_types/node/node.inc on line 46.
the line says:
foreach ($panel_args as $id => $arg) {
$nid = str_replace("@$id", $arg, $nid);
}
anybody know what it's about?
Thanks
Martin
Comments
Comment #1
chesterton_martin commentedComment #2
Anonymous (not verified) commentedI'm getting the same error, but this time on an All blogs page. It's fine if there's no content, but if I add an existing node I get an error message on the /blog page:
warning: Invalid argument supplied for foreach() in /home/sites/haringeyshed.org/public_html/newsite/sites/all/modules/ctools/plugins/content_types/node/node.inc on line 46.
And if I add a block display of a view I get:
warning: Invalid argument supplied for foreach() in /home/sites/haringeyshed.org/public_html/newsite/sites/all/modules/ctools/views_content/plugins/content_types/views.inc on line 131.
as well.
It doesn't stop the content from being displayed, but I would like to sort it out.
Anyone got any ideas?
Thanks!
Matt
UPDATE:
I removed lines 46 of node.inc and 131 of views.inc just to see what happened, and the error messages went away. Turns out it was the same bit of code causing a problem in each:
If I leave the code out permanently, will it do terrible violence to the rest of the module or should it be ok?
Thanks!
Comment #3
nickgunman commentedThis works in my case (views in blog).
if($panel_args)
{
foreach ($panel_args as $id => $arg) {
$nid = str_replace("@$id", $arg, $nid);
}
}