From 6ff8671de032c675cdf4e83650acc6e74f30622e Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Sun, 28 Jan 2024 00:04:26 -0500 Subject: [PATCH] Fix caching check. --- includes/core/classes/class-event.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index 335d782ed..ef56baefd 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -591,7 +591,8 @@ public function get_datetime(): array { } $cache_key = sprintf( self::DATETIME_CACHE_KEY, $this->event->ID ); - $data = wp_cache_get( $cache_key ) ?? $this->datetimes; + $cache = wp_cache_get( $cache_key ); + $data = ! empty( $cache ) ? $cache : $this->datetimes; if ( empty( $data ) || ! is_array( $data ) ) { $table = sprintf( static::TABLE_FORMAT, $wpdb->prefix );