summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authoranrikun2017-03-08 22:02:06 +0100
committerfago2017-03-08 22:02:06 +0100
commitd50db77d1575be2cd37307a92feb889dc292dbdb (patch)
treec8aeb3f5d3d32ae1b285866340035980c9b33eed /modules
parentc6b3a2ee2fa89bfe0f03638370a195f8e01174d9 (diff)
Issue #2807275 by anrikun: Notice : Undefined property: stdClass::$nid in node_access()HEAD7.x-1.x
Diffstat (limited to 'modules')
-rw-r--r--modules/callbacks.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/callbacks.inc b/modules/callbacks.inc
index 0c5c8ee..ee156ab 100644
--- a/modules/callbacks.inc
+++ b/modules/callbacks.inc
@@ -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 {