diff --git a/HISTORY.md b/HISTORY.md index 2456598b6..6e800456e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ ## Version 4.2.1 - In development BUG: Issue #809 - Interface order and minimum required PHP version (ganiuszka) +BUG: Issue #810 - Index 0 is out of range error from TAuthorizationRuleCollection::insertAt (ganiuszka) ## Version 4.2.0 - Apr 19, 2022 diff --git a/framework/Security/TAuthorizationRuleCollection.php b/framework/Security/TAuthorizationRuleCollection.php index 4bec145a7..8e906f996 100644 --- a/framework/Security/TAuthorizationRuleCollection.php +++ b/framework/Security/TAuthorizationRuleCollection.php @@ -54,7 +54,7 @@ public function isUserAllowed($user, $verb, $ip, $extra = null) public function insertAt($index, $item) { if ($item instanceof TAuthorizationRule) { - parent::insertAt($index, $item); + parent::insertAtIndexInPriority($item, $index); } else { throw new TInvalidDataTypeException('authorizationrulecollection_authorizationrule_required'); }