Skip to content
Snippets Groups Projects
Commit d50db77d authored by anrikun's avatar anrikun Committed by fago
Browse files

Issue #2807275 by anrikun: Notice : Undefined property: stdClass::$nid in node_access()

parent c6b3a2ee
No related branches found
No related tags found
No related merge requests found
......@@ -673,7 +673,7 @@ function entity_metadata_no_hook_node_access($op, $node = NULL, $account = NULL)
if (empty($node->vid) && in_array($op, array('create', 'update'))) {
// This is a new node or the original node.
if (isset($node->type)) {
$op = !empty($node->is_new) && $node->is_new ? 'create' : 'update';
$op = empty($node->nid) || !empty($node->is_new) ? 'create' : 'update';
return node_access($op, $op == 'create' ? $node->type : $node, $account);
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment