Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the function entity_property_values_create_entity($entity_type, $values = array()) there seems to be a problem.
If you have a look at line 332 you can see the following:
// Now set the remaining values using the wrapper.
$wrapper = entity_metadata_wrapper($entity_type, $entity);
foreach ($values as $key => $value) {
if (!in_array($key, $info['entity keys'])) {
if (isset($wrapper->$key)) {
$wrapper->$key->set($value);
}
else {
$entity->$key = $value;
}
}
}
You can see in the else statement "$entity->$key = $value;" , $entity should be $wrapper? :)
Thanks,
Mo
Comment | File | Size | Author |
---|---|---|---|
#3 | entities.patch | 467 bytes | mojo4444 |
Comments
Comment #2
mojo4444 CreditAttribution: mojo4444 commentedComment #3
mojo4444 CreditAttribution: mojo4444 commentedPatch :)