I'm not sure what's causing this error, but it can be overcome by changing line 13 from

foreach ($content['fields'] as $field) {

to

foreach ((array)$content['fields'] as $field) {

Maybe someday PHP's array functions will be smart enough to handle scalars, but in the meantime (array) is a handy workaround.

Comments

tbenice’s picture

subbing, i ran into this. content_types can return null and that could be the problem. i'll roll a patch asap.

benstallings’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.