Invalid argument supplied for foreach() in ../dragndrop_uploads/module/filefield.inc line 13

Created on 1 February 2010, over 15 years ago
Updated 17 September 2025, 24 days ago

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.

πŸ› Bug report
Status

Closed: outdated

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024