When user does not have 'access content' permission, error message appears

Created on 12 October 2006, over 18 years ago
Updated 11 June 2025, 2 days ago

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.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Myron

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Thank you for your contributions to this issue. As Drupal 4 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.

Production build 0.71.5 2024