Skip to content
This repository has been archived by the owner on May 14, 2018. It is now read-only.

Commit

Permalink
Update src/BjyAuthorize/Provider/Role/ZendDb.php
Browse files Browse the repository at this point in the history
Adding to avoid the PHP Notice "Undefined index:  in [...]/bjyoungblood/bjy-authorize/src/BjyAuthorize/Provider/Role/ZendDb.php on line 55"
  • Loading branch information
messyOne committed Oct 10, 2012
1 parent 91fe03e commit df00825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BjyAuthorize/Provider/Role/ZendDb.php
Expand Up @@ -51,7 +51,7 @@ public function getRoles()
// Pass Two: Re-inject parent objects to preserve hierarchy // Pass Two: Re-inject parent objects to preserve hierarchy
foreach ($roles as $roleId=>$roleObj) { foreach ($roles as $roleId=>$roleObj) {
$parentRoleObj = $roleObj->getParent(); $parentRoleObj = $roleObj->getParent();
if ($parentRoleObj) { if ($parentRoleObj && $parentRoleObj->getRoleId()) {
$roleObj->setParent($roles[$parentRoleObj->getRoleId()]); $roleObj->setParent($roles[$parentRoleObj->getRoleId()]);
} }
} }
Expand Down

0 comments on commit df00825

Please sign in to comment.