Skip to content

Commit

Permalink
[CMSP-459] bugfix: re-add missing else (#437)
Browse files Browse the repository at this point in the history
* re-add missing else

* use the already-defined value of $port instead of hard-coding

* remove ternary in favor of elseif
  • Loading branch information
jazzsequence authored Jun 23, 2023
1 parent 7248457 commit d1b6103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

1 comment on commit d1b6103

@timnolte
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jazzsequence just noting that putting this back in is actually not correct.

Please sign in to comment.