From d73fd918e21b13a9bb87edb3f673892dbb7037ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Thu, 29 Jun 2023 12:40:32 +0200 Subject: [PATCH 1/4] update pot --- languages/redis-cache.pot | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/languages/redis-cache.pot b/languages/redis-cache.pot index 0ea8a978..94e54642 100644 --- a/languages/redis-cache.pot +++ b/languages/redis-cache.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv3. msgid "" msgstr "" -"Project-Id-Version: Redis Object Cache 2.4.2\n" +"Project-Id-Version: Redis Object Cache 2.4.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2023-06-28T12:54:55+00:00\n" +"POT-Creation-Date: 2023-06-29T10:40:20+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.8.1\n" "X-Domain: redis-cache\n" @@ -294,30 +294,30 @@ msgstr "" msgid "Object cache drop-in could not be updated. Redis server is unreachable: %s" msgstr "" -#: includes/object-cache.php:2907 +#: includes/object-cache.php:2911 msgid "Error establishing a Redis connection" msgstr "" #. translators: %s = Formatted wp-config.php file name. -#: includes/object-cache.php:2914 +#: includes/object-cache.php:2918 msgid "WordPress is unable to establish a connection to Redis. This means that the connection information in your %s file are incorrect, or that the Redis server is not reachable." msgstr "" -#: includes/object-cache.php:2919 +#: includes/object-cache.php:2923 msgid "Is the correct Redis host and port set?" msgstr "" -#: includes/object-cache.php:2920 +#: includes/object-cache.php:2924 msgid "Is the Redis server running?" msgstr "" #. translators: %s = Link to installation instructions. -#: includes/object-cache.php:2925 +#: includes/object-cache.php:2929 msgid "If you need help, please read the installation instructions." msgstr "" #. translators: %1$s = Formatted object-cache.php file name, %2$s = Formatted wp-content directory name. -#: includes/object-cache.php:2932 +#: includes/object-cache.php:2936 msgid "To disable Redis, delete the %1$s file in the %2$s directory." msgstr "" From 0d600c295d56ff95289299bc32f6976a190926d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Thu, 29 Jun 2023 12:40:54 +0200 Subject: [PATCH 2/4] fix loading translations --- includes/object-cache.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/object-cache.php b/includes/object-cache.php index 79a1b9c0..0b2f8d62 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -2894,6 +2894,10 @@ protected function handle_exception( $exception ) { protected function show_error_and_die( Exception $exception ) { wp_load_translations_early(); + add_filter( 'pre_determine_locale', function () { + return defined( 'WPLANG' ) ? WPLANG : 'en_US'; + } ); + // Load custom DB error template, if present. if ( file_exists( WP_CONTENT_DIR . '/redis-error.php' ) ) { require_once WP_CONTENT_DIR . '/redis-error.php'; From cffc8da35395c9ee4bd1287ffb5276b6d4242409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Thu, 29 Jun 2023 12:41:02 +0200 Subject: [PATCH 3/4] fix php 7.2 syntax error --- includes/object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/object-cache.php b/includes/object-cache.php index 0b2f8d62..c69dbd83 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -2935,7 +2935,7 @@ protected function show_error_and_die( Exception $exception ) { // translators: %1$s = Formatted object-cache.php file name, %2$s = Formatted wp-content directory name. __( 'To disable Redis, delete the %1$s file in the %2$s directory.', 'redis-cache' ), 'object-cache.php', - '/wp-content/', + '/wp-content/' ) . "

\n"; wp_die( $message ); From cbc51a35acb33a47b0aa6564b3eb7af1e12a550f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Thu, 29 Jun 2023 12:41:14 +0200 Subject: [PATCH 4/4] tag v2.4.3 --- CHANGELOG.md | 5 +++++ includes/object-cache.php | 2 +- readme.txt | 7 ++++++- redis-cache.php | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6cb6f92..6d52649d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.4.3 + +- Fixed PHP `<=7.2` syntax error +- Fixed loading error-page translations + ## 2.4.2 - Made admin-bar script more robust diff --git a/includes/object-cache.php b/includes/object-cache.php index c69dbd83..89545b9d 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -3,7 +3,7 @@ * Plugin Name: Redis Object Cache Drop-In * Plugin URI: https://wordpress.org/plugins/redis-cache/ * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. - * Version: 2.4.2 + * Version: 2.4.3 * Author: Till Krüss * Author URI: https://objectcache.pro * License: GPLv3 diff --git a/readme.txt b/readme.txt index 70815870..83d06c8a 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: redis, object cache, cache, object caching, caching performance, relay, pr Requires at least: 3.3 Tested up to: 6.2 Requires PHP: 7.2 -Stable tag: 2.4.2 +Stable tag: 2.4.3 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -62,6 +62,11 @@ Redis Object Cache has various WP CLI commands, for more information run `wp hel == Changelog == += 2.4.3 = + +- Fixed PHP `<=7.2` syntax error +- Fixed loading error-page translations + = 2.4.2 = - Made admin-bar script more robust diff --git a/redis-cache.php b/redis-cache.php index 822570b8..3fa881a0 100644 --- a/redis-cache.php +++ b/redis-cache.php @@ -3,7 +3,7 @@ * Plugin Name: Redis Object Cache * Plugin URI: https://wordpress.org/plugins/redis-cache/ * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. - * Version: 2.4.2 + * Version: 2.4.3 * Text Domain: redis-cache * Domain Path: /languages * Network: true