mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 13:58:55 +08:00
Fixes #12810: getChildRoles() throws an exception when role has no children
This commit is contained in:
committed by
Alexander Makarov
parent
f71a14c284
commit
73a30780b3
@ -481,7 +481,7 @@ class DbManager extends BaseManager
|
||||
throw new InvalidParamException("Role \"$roleName\" not found.");
|
||||
}
|
||||
|
||||
/** @var $result Item[] */
|
||||
$result = [];
|
||||
$this->getChildrenRecursive($roleName, $this->getChildrenList(), $result);
|
||||
|
||||
$roles = [$roleName => $role];
|
||||
|
||||
@ -407,7 +407,7 @@ class PhpManager extends BaseManager
|
||||
throw new InvalidParamException("Role \"$roleName\" not found.");
|
||||
}
|
||||
|
||||
/** @var $result Item[] */
|
||||
$result = [];
|
||||
$this->getChildrenRecursive($roleName, $result);
|
||||
|
||||
$roles = [$roleName => $role];
|
||||
|
||||
Reference in New Issue
Block a user