Skip to content

Commit d1b6103

Browse files
authored
[CMSP-459] bugfix: re-add missing else (#437)
* re-add missing else * use the already-defined value of $port instead of hard-coding * remove ternary in favor of elseif
1 parent 7248457 commit d1b6103

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

object-cache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,8 @@ public function build_client_parameters( $redis_server ) {
12641264
if ( file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection.
12651265
// port must be null or socket won't connect.
12661266
$port = null;
1267+
} elseif ( ! empty( $redis_server['port'] ) ) { // tcp connection.
1268+
$port = $redis_server['port'];
12671269
}
12681270

12691271
$defaults = [

0 commit comments

Comments
 (0)