Trying to install the module I get:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /.../public_html/sites/all/modules/nodereference_views_select/nodereference_views_select.views.inc on line 111

Around that line, the code looks like:

function _nodereference_views_select_views_items($view, $nodes)
{
	foreach ($nodes as &$node)
	{
		$node = node_load($node->nid);	
	}
	
	return $nodes;
}

Best regards

Comments

jbomb’s picture

What version of PHP are you running? the following foreach syntax is only supported in PHP 5

foreach ($nodes as &$node) { //...

you might try changing:

foreach ($nodes as &$node) {
  $node = node_load($node->nid);	
}

to :

foreach ($nodes as $key => $node) {
  $nodes[$key] = node_load($node->nid);
}
jdm65b’s picture

That's right. My hosting company uses PHP 4.4.7 and your suggestion is correct.

Thank you very much.

jdm65b’s picture

Status: Active » Closed (fixed)