Active
Project:
Strongarm
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Jun 2012 at 08:30 UTC
Updated:
3 Mar 2014 at 08:41 UTC
Jump to comment: Most recent, Most recent file
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).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | invalid_arg-1612400-2.patch | 1.14 KB | bblake |
Comments
Comment #1
bblake commentedComment #2
bblake commentedDoes this patch fix the warning for you?
Comment #3
fietserwinYes 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.
Comment #4
bblake commentedI 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.
Comment #6
antonyanimator commentedI 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).