It looks like, occasionally (not sure exactly how), $entity->$field_name isset and is iteratable, but doesn't actually contain anything. I *suspect* that this has to do with json_deocde, but I'm unsure. This results in us getting an "invalid foreach" error on $values[0] on line 157. It's a fairly easy fix, just need to change isset to !empty

CommentFileSizeAuthor
#1 1664888.invalid-foreach.patch785 bytesphayes

Comments

phayes’s picture

StatusFileSize
new785 bytes

Patch is attached.

phayes’s picture

Status: Active » Needs review
chx’s picture

Status: Needs review » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

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