Browse Source

Check if conditions exist before applying contexts to them

MNPALS-2.x
Lucas van Schaik 2 years ago committed by Rosie Le Faive
parent
commit
2c48c8795f
  1. 2
      src/IslandoraContextManager.php

2
src/IslandoraContextManager.php

@ -62,7 +62,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