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

CommentFileSizeAuthor
#3 entities.patch467 bytesmojo4444
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mojo4444 created an issue. See original summary.

mojo4444’s picture

Assigned: mojo4444 » Unassigned
mojo4444’s picture

FileSize
467 bytes

Patch :)