If the user can't see any items @ ?q=admin, they receive the following error:

warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/head/modules/system/system.module on line 2165.

To reproduce this, give a user only "access administration pages" permission and nothing else. Apply the patch here: http://drupal.org/node/92015 to fix the "view logs coupled to access administration pages" bug. Go to ?q=admin. I think this can also be reproduced by manually moving all admin menus to something else like "Primary Links" or what have you.

At any rate, we should do something nicer than spit out an error when there's nothing to see here. :)

CommentFileSizeAuthor
#3 error_0.patch620 bytesChrisKennedy
#1 error.patch620 byteswebchick

Comments

webchick’s picture

StatusFileSize
new620 bytes

This is a perfect example of why we should Make Drupal E_ALL compliant; this error likely would've been caught months ago.

webchick’s picture

Status: Active » Needs review
ChrisKennedy’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new620 bytes

It does indeed work. Syncing with HEAD.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)