From 5437bf07a3171e4ca79cc129ba29cb71efec295b Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 22 Sep 2023 11:36:59 -0400 Subject: [PATCH] Check for VIP_GO_APP_ENVIRONMENT before using it --- drop-ins/object-cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drop-ins/object-cache.php b/drop-ins/object-cache.php index 0b8ee16d7d..963acaee56 100644 --- a/drop-ins/object-cache.php +++ b/drop-ins/object-cache.php @@ -13,8 +13,10 @@ // Will use the "next" version on these specified environment types by default. if ( ! defined( 'VIP_USE_NEXT_OBJECT_CACHE_DROPIN' ) ) { - if ( in_array( VIP_GO_APP_ENVIRONMENT, [ 'develop', 'preprod', 'staging' ], true ) ) { + if ( defined( 'VIP_GO_APP_ENVIRONMENT' ) && in_array( VIP_GO_APP_ENVIRONMENT, [ 'develop', 'preprod', 'staging' ], true ) ) { define( 'VIP_USE_NEXT_OBJECT_CACHE_DROPIN', true ); + } else { + define( 'VIP_USE_NEXT_OBJECT_CACHE_DROPIN', false ); } }