Windows XP sp2
WAMP 1.70:
PHP 5.2.1
Mysql 5.0.27
Apache/2.2.4

When I enable the Favorite Nodes on the Modules, Click the My account, will be display error:

: Object of class stdClass could not be converted to string in D:\work\drupal-5.1\modules\favorite_nodes\favorite_nodes.module on line 92.

It's sort the $node_type by natcasesort() function error.

Didn't Favorite Nodes support the PHP new version? Or natcasesort() on new version PHP5 can't convert the $node_type array?

Comments

jaydub’s picture

The drupal function node_get_types() changed from 4.7 to 5. The old function returns an array. The new function has a number of parameters that affect the output but the default execution of the function will return an array of objects. This change seems to break with natcasesort. I changed the natcasesort to ksort and the errors go away although I have not tested further at this point.

Christefano-oldaccount’s picture

Duplicate of http://drupal.org/node/114590. See that issue for a patch.

moshe weitzman’s picture

Status: Active » Fixed

i believe this was recently fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.