[AclProvider] Fix incorrect behaviour when partial results returned from cache
This commit is contained in:
parent
2375046a64
commit
edae59c242
@ -165,8 +165,17 @@ class AclProvider implements AclProviderInterface
|
||||
|
||||
// Is it time to load the current batch?
|
||||
if ((self::MAX_BATCH_SIZE === count($currentBatch) || ($i + 1) === $c) && count($currentBatch) > 0) {
|
||||
$loadedBatch = $this->lookupObjectIdentities($currentBatch, $sids, $oidLookup);
|
||||
|
||||
try {
|
||||
$loadedBatch = $this->lookupObjectIdentities($currentBatch, $sids, $oidLookup);
|
||||
} catch (AclNotFoundException $aclNotFoundexception) {
|
||||
if ($result->count()) {
|
||||
$partialResultException = new NotAllAclsFoundException('The provider could not find ACLs for all object identities.');
|
||||
$partialResultException->setPartialResult($result);
|
||||
throw $partialResultException;
|
||||
} else {
|
||||
throw $aclNotFoundexception;
|
||||
}
|
||||
}
|
||||
foreach ($loadedBatch as $loadedOid) {
|
||||
$loadedAcl = $loadedBatch->offsetGet($loadedOid);
|
||||
|
||||
|
Reference in New Issue
Block a user