Besides this module, I a;so have installed the Allow All File Extensions module. That module wlaks throgh all forms to look for file validators to change them.

However, the form that this module creates with function feeds_ui_mapping_form() (feeds_ui.admin.inc) can contain child elements of the value NULL if the function feeds_ui_mapping_settings_form() returns nothing (void), i.e. if there is nothing to edit/update or whatever.

This NULL value leads to the warning:
Warning: Invalid argument supplied for foreach() in element_children() (line 6420 of includes\common.inc).
when the form is walked.

To prevent this warning, this module should not add NULL child elements to a form element. To solve there are 2 options:

  1. Have feeds_ui_mapping_form() check for NULL and not add the element. This will create holes (missing indices) in the array of child elements, but the other elements are still rendered in their correct rows.
  2. Have feeds_ui_mapping_settings_form() return array().

Both ways, work but the latter is simpler. see attached patch

CommentFileSizeAuthor
patch.patch321 bytesfietserwin

Comments

litzastark’s picture

I was seeing this error and this patch solved the problem. Thanks, fietserwin!

fietserwin’s picture

Status: Needs review » Reviewed & tested by the community

Based on my own experiences and #1...

  • twistor committed d47d293 on 7.x-2.x authored by fietserwin
    Issue #2218999 by fietserwin: Fixed Warning: Invalid argument supplied...
twistor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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