Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: bblake commentedComment #2
bblake CreditAttribution: 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 CreditAttribution: 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
P2790 CreditAttribution: P2790 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).