Merge "tests: Prefer assertSame() when comparing the integer 0"
[lhc/web/wiklou.git] / includes / Permissions / PermissionManager.php
index 6c614f6..ef6b8ac 100644 (file)
@@ -85,8 +85,8 @@ class PermissionManager {
        /** @var NamespaceInfo */
        private $nsInfo;
 
-       /** @var string[] Cached results of getAllRights() */
-       private $allRights = false;
+       /** @var string[]|null Cached results of getAllRights() */
+       private $allRights;
 
        /** @var string[][] Cached user rights */
        private $usersRights = null;
@@ -97,7 +97,7 @@ class PermissionManager {
         */
        private $temporaryUserRights = [];
 
-       /** @var string[] Cached rights for isEveryoneAllowed */
+       /** @var bool[] Cached rights for isEveryoneAllowed, [ right => allowed ] */
        private $cachedRights = [];
 
        /**
@@ -1471,7 +1471,7 @@ class PermissionManager {
         * @return string[] Array of permission names
         */
        public function getAllPermissions() {
-               if ( $this->allRights === false ) {
+               if ( $this->allRights === null ) {
                        if ( count( $this->options->get( 'AvailableRights' ) ) ) {
                                $this->allRights = array_unique( array_merge(
                                        $this->coreRights,