Warning: Invalid argument supplied for foreach() field_view_mode_settings()

Created on 10 May 2016, over 9 years ago
Updated 2 June 2025, 3 months ago

This warning occurs when I have an image field and set as linked field, this field when has no value and the field element will be, for example, array(field_image => NULL). This small patch adds a check to not process empty element.

Affected function linked_field_field_attach_view_alter(&$output, $context).

🐛 Bug report
Status

Closed: won't fix

Version

1.10

Component

Code

Created by

🇨🇳China balawang

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.

Production build 0.71.5 2024