Commit 96bf30f8 authored by Kars-T's avatar Kars-T Committed by amitaibu

Issue #2058709 by Kars-T: og_node_access() should use...

Issue #2058709 by Kars-T: og_node_access() should use countReferencableEntities() instead of getReferencableEntities
parent 024a2011
......@@ -529,7 +529,7 @@ function og_node_access($node, $op, $account) {
// Set the "field mode" to default, before passing it to the
// selection handler.
$instance['field_mode'] = 'default';
if (entityreference_get_selection_handler($field, $instance)->getReferencableEntities(NULL, 'CONTAINS', 1)) {
if (entityreference_get_selection_handler($field, $instance)->countReferencableEntities()) {
return NODE_ACCESS_ALLOW;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment