The variable $params seems to never exist, and therefore empty should always return true. Did you maybe rename this variable?
This check looks for calls to isset(...) or empty() on variables
that are yet undefined. These calls will always produce the same result and
can be removed.
This is most likely caused by the renaming of a variable or the removal of
a function/method parameter.
Loading history...
41
$this->roles = $this->tree($params['roles']);
42
}
43
}
44
45
/**
46
* Assign RBAC element into user
47
*
48
* @access public
49
*
50
* @param integer $userId user id
51
* @param string $name element name
52
*
53
* @return bool
54
*/
55
public function assign($userId, $name)
56
{
57
if ($this->searchRoleRecursive($this->roles, $name)) {