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
Comment #1
tbenice commentedsubbing, i ran into this. content_types can return null and that could be the problem. i'll roll a patch asap.
Comment #2
benstallings commented