From fe5f0db0f4a8e3fe88380d9c5e49e078602a775e Mon Sep 17 00:00:00 2001 From: EarthlingDavey <15802017+EarthlingDavey@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:19:48 +0100 Subject: [PATCH] Don't check file system when host has protocol/scheme. Fixes https://github.com/pantheon-systems/wp-redis/issues/442 --- object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index e84beef..530348c 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1268,7 +1268,7 @@ public function build_client_parameters( $redis_server ) { } } - if ( file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection. + if ( ! str_contains( $redis_server['host'], '://' ) && file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection. // port must be null or socket won't connect. unset( $redis_server['port'] ); $port = null;