permissions: Avoid null as init for PermissionManager->usersRights cache
Using the empty array as init value and to reset the cache avoids implicit array casts on the usages, which makes the type clear Change-Id: I9b3a8786aeb79084b4d44169768d375cace36d92
This commit is contained in:
parent
7a545309c7
commit
1866aef83c
1 changed files with 2 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ class PermissionManager {
|
|||
private $userCache;
|
||||
|
||||
/** @var string[][] Cached user rights */
|
||||
private $usersRights = null;
|
||||
private $usersRights = [];
|
||||
|
||||
/**
|
||||
* Temporary user rights, valid for the current request only.
|
||||
|
|
@ -1478,7 +1478,7 @@ class PermissionManager {
|
|||
$rightsCacheKey = $this->getRightsCacheKey( $user );
|
||||
unset( $this->usersRights[ $rightsCacheKey ] );
|
||||
} else {
|
||||
$this->usersRights = null;
|
||||
$this->usersRights = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue