Skip to content

Commit

Permalink
Merge branch 'master' into readme-updates-0-7-0
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Aug 22, 2017
2 parents 3b91c3c + 0ac6186 commit b0d2996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ protected function _connect_redis() {
* @param callable $setup_connection Callback to execute.
*/
$setup_connection = apply_filters( 'wp_redis_perform_client_connection_callback', $setup_connection );
call_user_func_array( $setup_connection, array( $this->redis, $redis_server, $keys_methods ) );
call_user_func_array( $setup_connection, array( $this->redis, $client_parameters, $keys_methods ) );
} catch ( Exception $e ) {
$this->_exception_handler( $e );
}
Expand Down Expand Up @@ -1118,12 +1118,12 @@ public function prepare_client_connection( $client_parameters ) {
* @return bool True if successful.
*/
public function perform_client_connection( $redis, $client_parameters, $keys_methods ) {
foreach ( $keys_methods as $k => $method ) {
if ( ! isset( $client_parameters[ $k ] ) ) {
foreach ( $keys_methods as $key => $method ) {
if ( ! isset( $client_parameters[ $key ] ) ) {
continue;
}
try {
$redis->$method( $client_parameters[ $k ] );
$redis->$method( $client_parameters[ $key ] );
} catch ( RedisException $e ) {

// PhpRedis throws an Exception when it fails a server call.
Expand Down

0 comments on commit b0d2996

Please sign in to comment.