security updates
have to check views and entityreference for custom patches
This commit is contained in:
@@ -20,7 +20,9 @@ function _entityreference_devel_generate($object, $field, $instance, $bundle) {
|
||||
$referencable_entity = entityreference_get_selection_handler($field, $instance)->getReferencableEntities();
|
||||
if (is_array($referencable_entity) && !empty($referencable_entity)) {
|
||||
// Get a random key.
|
||||
$object_field['target_id'] = array_rand($referencable_entity);
|
||||
foreach ($referencable_entity as $type => $eids) {
|
||||
$object_field['target_id'] = array_rand($eids);
|
||||
}
|
||||
}
|
||||
return $object_field;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user