Browse Source

Check if conditions exist before applying contexts to them

pull/931/head
Lucas van Schaik 2 years ago
parent
commit
4250109c63
  1. 2
      src/IslandoraContextManager.php

2
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;
}

Loading…
Cancel
Save