By dwlamb01 on
Trying to set-up image_gallery_access I receive the following message (path on the module ommitted for presenting here only.):
warning: Invalid argument supplied for foreach() in image_gallery_access.module on line 308.
This is the relevant function at stated line 308:
foreach ($rids as $rid) {
if (isset($account->roles[$rid])) {
return $return[$account->uid] = TRUE;
}
However, when logged-in as admin, I don't get the error. It only appears to an authenticated user. If it's a permissions question, the error appears whether image_gallery module-administer image galleries is checked for authenticated user or not.
Comments
You don't get this error as
You don't get this error as admin because user 1 is specifically exempted from running the code generating this error by the clause on line 294.
Visit the image gallery admin form again at admin/content/image/edit/ and there should be some new settings to fill out. Once these are filled you should stop seeing this error.
If you are still having this error you might consider opening a support request in the module issue queue at http://drupal.org/project/issues/image_gallery_access?categories=All