diff --git a/composer.json b/composer.json index 6f334f6..1c4e6f3 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "johnpbloch/wordpress": "^6.8", "pantheon-systems/wp-redis": "^1.4", "humanmade/wp-redis-predis-client": "^0.2.0", - "afragen/git-updater": "^12.22", + "afragen/git-updater": "^12.23", "fairpm/fair-parent-theme": "~1.0.1", "fairpm/fair-beacon": "dev-main", "humanmade/aws-ses-wp-mail": "dev-master", diff --git a/composer.lock b/composer.lock index 97d8496..9d849d8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ae4a197564dd03ef52882a7afc6de970", + "content-hash": "70567396d962a40db510bedf32a251a0", "packages": [ { "name": "afragen/git-updater", diff --git a/content/object-cache.php b/content/object-cache.php index 000b71e..426481a 100644 --- a/content/object-cache.php +++ b/content/object-cache.php @@ -2,13 +2,12 @@ WP_Predis\add_filters(); // Set the host from the environment variable before loading the plugin logic -if ( getenv( 'REDIS_HOST' ) ) { - if ( ! defined( 'WP_REDIS_BACKEND_HOST' ) ) { - define( 'WP_REDIS_BACKEND_HOST', getenv( 'REDIS_HOST' ) ); - } - if ( ! defined( 'WP_REDIS_PORT' ) ) { - define( 'WP_REDIS_PORT', getenv( 'REDIS_PORT' ) ?? 6379 ); - } +if ( getenv( 'REDIS_PORT' ) && ! defined( 'WP_REDIS_PORT' ) ) { + define( 'WP_REDIS_PORT', getenv( 'REDIS_PORT' ) ); +} + +if ( getenv( 'REDIS_HOST' ) && ! defined( 'WP_REDIS_BACKEND_HOST' ) ) { + define( 'WP_REDIS_BACKEND_HOST', getenv( 'REDIS_HOST' ) ); } require_once __DIR__ . '/plugins/wp-redis/object-cache.php';