When user does not have 'access content' permission, error message appears
Myron - October 12, 2006 - 22:21
| Project: | Node Moderation |
| Version: | 4.6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
In my particular situation, I disabled the anonymous user from access to any content, and received the following error message:
warning: implode() [function.implode]: Bad arguments. in nmoderation.module on line 54.
This happens because nmoderation_set_head() returns NULL when the user doesn't have "access content" permissions, which is used as an argument to implode().
It is easy to fix by inserting the following line at line 65:
return array();
This will return an empty array instead of a NULL in this situation. I don't know if this is the ideal way to fix it, but it does the trick.

#1
Oops, just found the related bug:
http://drupal.org/node/56869