I'm getting this warning on the admin/config/development/strongarm page when there is nothing to show yet. i could trace it back to file strongarm.admin.inc:

function theme_strongarm_admin_form(&$vars) {
  ...
  foreach (element_children($form['name']) as $name) {
    ...
  }
}

Where $form['name'] equals null (instead of an empty array).

CommentFileSizeAuthor
#2 invalid_arg-1612400-2.patch1.14 KBbblake
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bblake’s picture

Assigned: Unassigned » bblake
bblake’s picture

Status: Active » Needs review
FileSize
1.14 KB

Does this patch fix the warning for you?

fietserwin’s picture

Status: Needs review » Reviewed & tested by the community

Yes it does.

Note: the reason I did not post a patch like this is because I could not quickly figure out whether it may be expected to get a null here or that some other function should return an empty array instead of null. That is still up to you.

bblake’s picture

Status: Reviewed & tested by the community » Fixed

I see why it's getting a null rather than an empty array, and it seems to me that either this fix or initializing an empty array are valid fixes.

Patch has been committed. Thanks for your help.

Status: Fixed » Closed (fixed)

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

P2790’s picture

Version: 7.x-2.0-rc1 » 7.x-2.x-dev
Issue summary: View changes
Status: Closed (fixed) » Active

I am receiving this error with the current dev.

Warning: Invalid argument supplied for foreach() in element_children() (line 6420 of /home/e-smith/files/ibays/sota4/html/includes/common.inc).