From 66189b37b5cc9c5162e93650b826e5f616bb2b34 Mon Sep 17 00:00:00 2001 From: Phil Tyler Date: Fri, 6 Dec 2024 12:55:30 -0800 Subject: [PATCH] Check WP_REDIS_USE_RELAY is true too --- object-cache.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/object-cache.php b/object-cache.php index 7ac0757..1dab4ae 100644 --- a/object-cache.php +++ b/object-cache.php @@ -1226,7 +1226,8 @@ protected function _connect_redis() { * not with a message describing the issue. */ public function check_client_dependencies() { - $has_relay = defined( 'WP_REDIS_USE_RELAY' ) && class_exists( 'Relay\Relay' ); + $has_relay = defined( 'WP_REDIS_USE_RELAY' ) && WP_REDIS_USE_RELAY && class_exists( 'Relay\Relay' ); + if ( ! $has_relay || ! class_exists( 'Redis' ) ) { return 'Warning! PHPRedis extension is unavailable, which is required by WP Redis object cache.'; }