security update for entity_reference

This commit is contained in:
2018-04-21 00:03:39 +02:00
parent 85772b4ca7
commit 226561ffd4
18 changed files with 475 additions and 138 deletions

View File

@@ -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;
}
/*