Warning: foreach() argument must be of type array|object, null given in /web/modules/contrib/geofield/src/Feeds/Target/Geofield.php on line 92

Created on 30 October 2024, 15 days ago

Problem/Motivation

Feeds imports break when using Geofield.

Caveat: This issue only seems to appear on PHP 8.1.x. PHP <8.2, up to and including 8.1.30.
It appears to not be an issue on PHP 8.2.

Warning: foreach() argument must be of type array|object, null given in /web/modules/contrib/geofield/src/Feeds/Target/Geofield.php on line 92

Steps to reproduce

Run a feeds import using on a content type that uses Geofield.
The error breaks the import.

Proposed resolution

See attached patch which resolves the issue.

🐛 Bug report
Status

Active

Version

1.61

Component

Code

Created by

🇺🇸United States Taiger Bend, Oregon

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

Comments & Activities

Production build 0.71.5 2024