I'm getting this warning for anonymous users viewing a node of a type that has fivestar ratings enabled. Any suggestions to remove this warning are welcome. If I can provide more useful information I'm happy to do so.

This problem is routinely reproducible on my installation, in this way:
1. As an anonymous user, open a node of any type (tested on OG group nodes, OG group content nodes, and page nodes). Observe normal behavior
2. Log in as user #1.
3. Open admin/content/types and click edit on given content type.
4. Check "enable Fivestar ratings", and accept default configuration.
5. Save changes.
6. As an anonymous user, again open the same node as in step 1. Observe error message at top of page: "warning: implode() [function.implode]: Bad arguments. in [...]/includes/form.inc on line 831."
7. Sign in as admin again and disable fivestar ratings for this content type.
8. As anonymous user, again open the same node as in step 1, and observe normal behavior (no error message).

Just in case, I tried creating a new node after step 5 and observing that node as anonymous user. The warning appears on this node also.

Note that these warnings do not appear for authenticated users.

This system has two roles: anonymous user and authenticated user.

Fivestar permissions for this system:
rate content: anonymous [no]; authenticated [yes]
use PHP for fivestar target: anonymous [no]; authenticated [no]

Drupal version: 6.14
PHP version: 5.2.4
Apache version: 2.0.52
MySQL version: 5.0.82sp1

It seems this error is a result of the variable $element['#parents'] not being an array but being used in implode(). Attached is the output of var_dump(xdebug_get_function_stack()) at includes/form.inc on line 831 when !is_array($element['#parent']), plus a dump of $element at that point as well.

Thanks for your help.

CommentFileSizeAuthor
dump.txt4.61 KBTwoMice

Comments

TwoMice’s picture

Status: Active » Closed (fixed)

Unfortunately, though conveniently, this behavior has gone away in the course of continued modifications to the site, leaving no clues as to its original cause.

Bummer.