re #108 $roleParams was not defined in scope

This commit is contained in:
Antonio Ramirez
2017-11-12 21:46:06 +01:00
parent 7a6f84a486
commit 77430fbb74

View File

@ -43,9 +43,11 @@ class AccessRuleFilter extends AccessRule
return true;
}
} else {
if (!isset($roleParams)) {
$roleParams = $this->roleParams instanceof Closure ? call_user_func($this->roleParams, $this) : $this->roleParams;
}
$roleParams = $this->roleParams instanceof Closure
? call_user_func($this->roleParams, $this)
: $this->roleParams;
if ($user->can($role, $roleParams)) {
return true;
}