security update for entity_reference
This commit is contained in:
@@ -125,10 +125,15 @@ function entityreference_feeds_set_target($source, $entity, $target, $value) {
|
||||
break;
|
||||
case 'label':
|
||||
$options = $handler->getReferencableEntities($value, '=');
|
||||
$options = reset($options);
|
||||
$etids = array_keys($options);
|
||||
// Use the first matching entity.
|
||||
$entity_id = reset($etids);
|
||||
if ($options) {
|
||||
$options = reset($options);
|
||||
$etids = array_keys($options);
|
||||
// Use the first matching entity.
|
||||
$entity_id = reset($etids);
|
||||
}
|
||||
else {
|
||||
$entity_id = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user