core/modules/node/src/NodeGrantDatabaseStorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/node/src/NodeGrantDatabaseStorage.php b/core/modules/node/src/NodeGrantDatabaseStorage.php index a664862..f33aba6 100644 --- a/core/modules/node/src/NodeGrantDatabaseStorage.php +++ b/core/modules/node/src/NodeGrantDatabaseStorage.php @@ -94,8 +94,8 @@ public function access(NodeInterface $node, $operation, $langcode, AccountInterf // cases. For now, this must remain marked as uncacheable, even when it is // theoretically cacheable, because we don't have the necessary metadata to // know it for a fact. - $set_cacheability = function (AccessResult $access_result, $op) { - if ($op === 'view') { + $set_cacheability = function (AccessResult $access_result) use ($operation) { + if ($operation === 'view') { return $access_result->addCacheContexts('cache_context.node_view_grants'); } else {