diff --git a/object-cache.php b/object-cache.php index d2f3ced..73f1ebb 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1264,6 +1264,8 @@ public function build_client_parameters( $redis_server ) { if ( file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection. // port must be null or socket won't connect. $port = null; + } elseif ( ! empty( $redis_server['port'] ) ) { // tcp connection. + $port = $redis_server['port']; } $defaults = [