diff options
-rw-r--r-- | Acl/Domain/Acl.php | 4 | ||||
-rw-r--r-- | Acl/Model/MutableAclInterface.php | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php index 4a4a2e2..a890bbe 100644 --- a/Acl/Domain/Acl.php +++ b/Acl/Domain/Acl.php @@ -311,9 +311,9 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * {@inheritDoc} */ - public function setParentAcl(AclInterface $acl) + public function setParentAcl(AclInterface $acl = null) { - if (null === $acl->getId()) { + if (null !== $acl && null === $acl->getId()) { throw new \InvalidArgumentException('$acl must have an ID.'); } diff --git a/Acl/Model/MutableAclInterface.php b/Acl/Model/MutableAclInterface.php index 521d307..a846a9f 100644 --- a/Acl/Model/MutableAclInterface.php +++ b/Acl/Model/MutableAclInterface.php @@ -114,9 +114,10 @@ interface MutableAclInterface extends AclInterface /** * Sets the parent ACL * - * @param AclInterface $acl + * @param AclInterface|null $acl + * @return void */ - function setParentAcl(AclInterface $acl); + function setParentAcl(AclInterface $acl = null); /** * Updates a class-based ACE |