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 a content type that uses Geofield.
The error breaks the import.

Proposed resolution

See attached patch which resolves the issue.

CommentFileSizeAuthor
geofield-feed-error-fix2.patch1008 bytestaiger

Comments

taiger created an issue. See original summary.

taiger’s picture

Issue summary: View changes

  • itamair committed 8882ee5f on 8.x-1.x
    Issue #3484712 by taiger: Warning: foreach() argument must be of type...
itamair’s picture

Status: Active » Fixed

trusting and committing into dev the patch provided

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.