Commit 0a33fc68 authored by Spokje's avatar Spokje Committed by nedjo

Issue #3009729 by Spokje, nedjo, jacob.embree, Liam Morland: Notice: Only...

Issue #3009729 by Spokje, nedjo, jacob.embree, Liam Morland: Notice: Only variables should be passed by reference in PHP 7.1
parent d5456f36
......@@ -98,8 +98,10 @@ class MigrateDestinationFieldCollection extends MigrateDestinationEntity {
if (isset($row->migrate_map_destid1)) {
// We're updated an existing entity - start from the previous data.
// entity_load() returns an array, so we get the field collection entity
// with array_shift().
if ($entity = array_shift(entity_load('field_collection_item', array($row->migrate_map_destid1), array(), TRUE))) {
// with reset().
$result = entity_load('field_collection_item', array($row->migrate_map_destid1), array(), TRUE);
$entity = reset($result);
if ($entity) {
$entity_old = clone $entity;
$updating = TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment