Commit cc4d4933 by Carsten Brandt

fixed undefined variable problem in AccessControl

parent 0b2aafc7
......@@ -64,6 +64,7 @@ class AccessControl extends ActionFilter
* ~~~
*
* where `$rule` is this rule, and `$action` is the current [[Action|action]] object.
* `$rule` will be `null` if access is denied because none of the rules matched.
*/
public $denyCallback;
/**
......@@ -79,6 +80,7 @@ class AccessControl extends ActionFilter
*/
public $rules = [];
/**
* Initializes the [[rules]] array by instantiating rule objects from configurations.
*/
......@@ -114,16 +116,14 @@ class AccessControl extends ActionFilter
} else {
$this->denyAccess($user);
}
return false;
}
}
if (isset($this->denyCallback)) {
call_user_func($this->denyCallback, $rule, $action);
call_user_func($this->denyCallback, null, $action);
} else {
$this->denyAccess($user);
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment