entity_lookup process plugin should not return a NULL
Issue #2938478 on drupal.org by joachim.
EntityLookup::transform returns the result of EntityLookup::query, and in certain circumstances, query() returns NULL:
if (empty($results)) {
return NULL;
}
That causes an error when the destination entity reference field tries to set that value in:
array_flip(): Can only flip STRING and INTEGER values! [warning]
EntityStorageBase.php:227
array_flip(): Can only flip STRING and INTEGER values! [warning]
EntityStorageBase.php:139
and for some destinations, a crash (e.g. Commerce product entities try to call methods on the target entities in the variations field).