From 9fc77a0c493fa78c4d89515988349f195c28a80d Mon Sep 17 00:00:00 2001 From: dilirity Date: Tue, 25 Jun 2024 12:23:56 +0000 Subject: [PATCH] Super cache - fix tempnam system directory warning (#38028) * Create cache directory first * changelog Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/9662108752 Upstream-Ref: Automattic/jetpack@54de012f406bb21fed4b28a03bb63477f85c4d08 --- CHANGELOG.md | 1 + wp-cache.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07f98a6f..c364fa80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This is an alpha version! The changes listed here are not final. ### Fixed - Detect when WP_CACHE is defined with "const" in wp-config.php - Super Cache: Align detection of Boost installs with activation of that plugin +- Super Cache: create the cache directory before creating the config file - Super Cache: do not show migration notice if already using Boost Cache - Super Cache: fixed a PHP warning when deactivating the plugin. - Super Cache: make sure plugins links is an array before using it. diff --git a/wp-cache.php b/wp-cache.php index bab5cd77..6c33e482 100644 --- a/wp-cache.php +++ b/wp-cache.php @@ -260,9 +260,9 @@ function wpsupercache_activate() { wpsc_init(); if ( + ! wp_cache_verify_cache_dir() || ! wpsc_check_advanced_cache() || - ! wp_cache_verify_config_file() || - ! wp_cache_verify_cache_dir() + ! wp_cache_verify_config_file() ) { $text = ob_get_contents(); ob_end_clean();