From c913c4d7ae5ddc96d37fe8b6a559132785eeb560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Thu, 23 Jan 2025 13:38:33 -0800 Subject: [PATCH] fixes --- includes/class-predis.php | 1 + includes/object-cache.php | 44 +++++++++++++++++++-------------------- readme.txt | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/includes/class-predis.php b/includes/class-predis.php index 9fbe687c..cb4e5099 100644 --- a/includes/class-predis.php +++ b/includes/class-predis.php @@ -206,6 +206,7 @@ protected function build_cluster_connection_array() { $cluster = array_values( WP_REDIS_CLUSTER ); foreach ( $cluster as $key => $server ) { + // phpcs:ignore WordPress.WP.AlternativeFunctions.parse_url_parse_url $components = parse_url( $server ); if ( ! empty( $components['scheme'] ) ) { diff --git a/includes/object-cache.php b/includes/object-cache.php index 44eb8e8c..33ebef6c 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -2501,30 +2501,29 @@ public function decr( $key, $offset = 1, $group = 'default' ) { * Used by the Debug bar plugin * * @return void - * - * phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped */ public function stats() { - ?> -

- Redis Status: - redis_status() ? 'Connected' : 'Not connected'; ?> -
- Redis Client: - diagnostics['client'] ?: 'Unknown'; ?> -
- Cache Hits: - cache_hits; ?> -
- Cache Misses: - cache_misses; ?> -
- Cache Size: - cache ) ) / 1024, 2 ); ?> KB -

- +

+ Redis Status: + redis_status() ? 'Connected' : 'Not connected'; ?> +
+ Redis Client: + diagnostics['client'] ?: 'Unknown'; ?> +
+ Cache Hits: + cache_hits; ?> +
+ Cache Misses: + cache_misses; ?> +
+ Cache Size: + cache ) ) / 1024, 2 ); ?> KB +

+ $server ) { + // phpcs:ignore WordPress.WP.AlternativeFunctions.parse_url_parse_url $components = parse_url( $server ); if ( ! empty( $components['scheme'] ) ) { diff --git a/readme.txt b/readme.txt index 6f6fc7e8..9b04045f 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: tillkruess Donate link: https://github.com/sponsors/tillkruss Tags: redis, object cache, caching, performance, relay Requires at least: 4.6 -Tested up to: 6.6 +Tested up to: 6.7 Requires PHP: 7.2 Stable tag: 2.5.4 License: GPLv3