Merge "Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 31 May 2018 19:01:07 +0000 (19:01 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 31 May 2018 19:01:07 +0000 (19:01 +0000)
1  2 
includes/GlobalFunctions.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/session/PHPSessionHandler.php

Simple merge
@@@ -1195,16 -1183,8 +1183,16 @@@ class LoadBalancer implements ILoadBala
                return ( $name != '' ) ? $name : 'localhost';
        }
  
 +      public function getServerInfo( $i ) {
 +              if ( isset( $this->servers[$i] ) ) {
 +                      return $this->servers[$i];
 +              } else {
 +                      return false;
 +              }
 +      }
 +
        public function getServerType( $i ) {
-               return isset( $this->servers[$i]['type'] ) ? $this->servers[$i]['type'] : 'unknown';
+               return $this->servers[$i]['type'] ?? 'unknown';
        }
  
        public function getMasterPos() {