Hi,

When I enable the 4.7 or the cvs version of this module for content types, the "node/add" form for these content types goes blank. I'm running a sandbox, ie clean install of Drupal 4.7.3 with php5.2 on windows. There are no other modules installed ontop of the standard, out-of-the-box ones.

The apache server logs state "Cannot use object of type stdClass as array in D:\\srv\\www\\drupal\\modules\\relationship\\relationship_api.inc on line 984". If I go into that function defined there (relationship_array2statements) and add

$properties = (array)$properties;

as first line, the module seems to work again. I will give this some more testing, as I really like this module and would love to use it for one of our projects. I'm still fairly new to Drupal, but it appears the function expects an associate array "$properties" but gets passed an object instead.

Klaus.

Comments

khaertel’s picture

As a follow-up this piece of code should actually be more stable than the previuos line I had as it appears that sometimes the relationship_array2statements function gets $properties passed as an object and sometimes as an array.

	if(gettype($properties) == 'object') {
		$properties = get_object_vars($properties);
	}
dman’s picture

Status: Active » Closed (fixed)

Long fixed or dead. Time to clean up the queue.