Merge "build: Set private flag in package.json (for now)"
[lhc/web/wiklou.git] / includes / clientpool / RedisConnectionPool.php
index 599fb6a..8a88fab 100644 (file)
@@ -218,7 +218,7 @@ class RedisConnectionPool implements LoggerAwareInterface {
                } else {
                        // TCP connection
                        $hostPort = IP::splitHostAndPort( $server );
-                       if ( !$hostPort ) {
+                       if ( !$server || !$hostPort ) {
                                throw new MWException( __CLASS__ . ": invalid configured server \"$server\"" );
                        }
                        list( $host, $port ) = $hostPort;
@@ -331,7 +331,7 @@ class RedisConnectionPool implements LoggerAwareInterface {
         * @deprecated since 1.23
         */
        public function handleException( $server, RedisConnRef $cref, RedisException $e ) {
-               return $this->handleError( $cref, $e );
+               $this->handleError( $cref, $e );
        }
 
        /**
@@ -442,7 +442,9 @@ class RedisConnRef {
         * @param Redis $conn
         * @param LoggerInterface $logger
         */
-       public function __construct( RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger ) {
+       public function __construct(
+               RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger
+       ) {
                $this->pool = $pool;
                $this->server = $server;
                $this->conn = $conn;