From 4250109c6345c771cab0a5287cd83a4ebadbd93d Mon Sep 17 00:00:00 2001 From: Lucas van Schaik Date: Mon, 20 Feb 2023 21:25:48 +0100 Subject: [PATCH] Check if conditions exist before applying contexts to them --- src/IslandoraContextManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IslandoraContextManager.php b/src/IslandoraContextManager.php index 9a318a5b..b3aec19c 100644 --- a/src/IslandoraContextManager.php +++ b/src/IslandoraContextManager.php @@ -50,7 +50,7 @@ class IslandoraContextManager extends ContextManager { // Apply context to any context aware conditions. // Abort if the application of contexts has been unsuccessful // similarly to BlockAccessControlHandler::checkAccess(). - if (!$this->applyContexts($conditions, $provided)) { + if (count($conditions) > 0 && !$this->applyContexts($conditions, $provided)) { return FALSE; }