Installed and configured OK. Everything works.
Later, as clean up I delete the default created user under 'Administrator bypass' tab.
From now on, the error appears always when switching to 'Protected roles' tab.
Recreating the deleted record gets it back to normal.

Comments

hunmonk’s picture

Status: Active » Postponed (maintainer needs more info)

please provide exact steps to reproduce, your report is not clear enough for me to understand the problem.

amontero’s picture

  1. Fresh 7.8 install.
  2. $ drush pm-download userprotect
  3. $ drush pm-enable userprotect -y
  4. Navigate to admin/config/people/userprotect/administrator_bypass
  5. Delete default created user (uid 1)
  6. Navigate to admin/config/people/userprotect/protected_roles

Message appears:
"Warning: Invalid argument supplied for foreach() in element_children() (line 6141 of /home/amontero/www/drupal-sandbox-1/includes/common.inc)."

amontero’s picture

Status: Postponed (maintainer needs more info) » Active
hunmonk’s picture

Title: Error "Invalid argument supplied for foreach() in element_children() (line 6141 of /www/includes/common.inc)" » form code for admin bypass doesn't support zero users
Priority: Normal » Minor
Status: Active » Fixed

this is a minor error with building the form in the case where there are no users with administrator bypass -- it doesn't affect the normal functionality of the module at all.

i've committed a fix for this issue to 6.x-1.x-dev and 7.x-1.x-dev.

amontero’s picture

Applied patch to my 7.x-1.0
Works OK.
Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.