Merge "User::getRights phpdoc from return array to string[]"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 21 Mar 2017 02:16:29 +0000 (02:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 21 Mar 2017 02:16:29 +0000 (02:16 +0000)
1  2 
includes/user/User.php

diff --combined includes/user/User.php
@@@ -1745,12 -1745,11 +1745,12 @@@ class User implements IDBAccessObject 
                                        $this->blockTrigger = 'cookie-block';
                                        return $tmpBlock;
                                } else {
 -                                      // If the block is not valid, clear the block cookie (but don't delete it,
 -                                      // because it needs to be cleared from LocalStorage as well and an empty string
 -                                      // value is checked for in the mediawiki.user.blockcookie module).
 -                                      $tmpBlock->setCookie( $this->getRequest()->response(), true );
 +                                      // If the block is not valid, remove the cookie.
 +                                      Block::clearCookie( $this->getRequest()->response() );
                                }
 +                      } else {
 +                              // If the block doesn't exist, remove the cookie.
 +                              Block::clearCookie( $this->getRequest()->response() );
                        }
                }
                return false;
  
        /**
         * Get the permissions this user has.
-        * @return array Array of String permission names
+        * @return string[] permission names
         */
        public function getRights() {
                if ( is_null( $this->mRights ) ) {