Merge pull request #1482 from romanlytvyn/temp-u4-8956

U4-8956 PublicAccessEntry.ClearRules() triggers an unhandled exception
This commit is contained in:
Sebastiaan Janssen
2016-09-16 09:49:54 +02:00
committed by GitHub

View File

@@ -107,9 +107,9 @@ namespace Umbraco.Core.Models
public void ClearRules()
{
foreach (var rule in _ruleCollection)
for (var i = _ruleCollection.Count - 1; i >= 0; i--)
{
RemoveRule(rule);
RemoveRule(_ruleCollection[i]);
}
}