Permalink
Browse files

Update src/BjyAuthorize/Provider/Role/ZendDb.php

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

0 comments on commit df00825

Please sign in to comment.