Skip to content

Commit

Permalink
Merge pull request #134 from schrankenstein/patch-1
Browse files Browse the repository at this point in the history
Increase Performance in unsetting rules in ACL
  • Loading branch information
Shardj authored Feb 28, 2021
2 parents 492c137 + aafdcfa commit 0762e1b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions library/Zend/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,7 @@ public function remove($resource)
public function removeAll()
{
foreach ($this->_resources as $resourceId => $resource) {
foreach ($this->_rules['byResourceId'] as $resourceIdCurrent => $rules) {
if ($resourceId === $resourceIdCurrent) {
unset($this->_rules['byResourceId'][$resourceIdCurrent]);
}
}
unset($this->_rules['byResourceId'][$resourceId]);
}

$this->_resources = [];
Expand Down

0 comments on commit 0762e1b

Please sign in to comment.