diff --git a/sites/all/modules/contrib/entity/entity.test b/sites/all/modules/contrib/entity/entity.test index 746713e..7f307eb 100644 --- a/sites/all/modules/contrib/entity/entity.test +++ b/sites/all/modules/contrib/entity/entity.test @@ -1618,4 +1618,4 @@ class EntityMetadataIntegrationTestCase extends EntityWebTestCase { return $this->{$wrapper->type()}; } } -} +} \ No newline at end of file diff --git a/sites/all/modules/contrib/entity/modules/callbacks.inc b/sites/all/modules/contrib/entity/modules/callbacks.inc index dca9e1d..a7b9c51 100644 --- a/sites/all/modules/contrib/entity/modules/callbacks.inc +++ b/sites/all/modules/contrib/entity/modules/callbacks.inc @@ -610,6 +610,10 @@ function entity_metadata_field_file_validate_item($items, $context) { * called entity_metadata_node_access(). */ function entity_metadata_no_hook_node_access($op, $node = NULL, $account = NULL) { + // $node will be a string for $op 'create'. + if ('create' == $op) { + return node_access($op, $node, $account); + } if (isset($node)) { // If a non-default revision is given, incorporate revision access. $default_revision = node_load($node->nid);