Commit 20580b61 authored by generalredneck's avatar generalredneck

Trying to fix a PHP 7 bug where the property value is coming out as "Array"

parent f5ad56c3
...@@ -102,12 +102,13 @@ function views_natural_sort_views_natural_sort_queue_rebuild_data($entry_type) { ...@@ -102,12 +102,13 @@ function views_natural_sort_views_natural_sort_queue_rebuild_data($entry_type) {
foreach ($entity_ids as $entity_id) { foreach ($entity_ids as $entity_id) {
$results = entity_load($entry_type['entity_type'], array($entity_id)); $results = entity_load($entry_type['entity_type'], array($entity_id));
$entity = reset($results); $entity = reset($results);
$field_name = $entry_type['field'];
$queue->createItem(array( $queue->createItem(array(
'eid' => $entity_id, 'eid' => $entity_id,
'entity_type' => $entry_type['entity_type'], 'entity_type' => $entry_type['entity_type'],
'field' => $entry_type['field'], 'field' => $field_name,
'delta' => 0, 'delta' => 0,
'content' => $entity->$entry_type['field'], 'content' => $entity->$field_name,
)); ));
} }
} }
......
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