From 0ea29229d21cb4814fd7f0d65a3f8a68b6c07ed1 Mon Sep 17 00:00:00 2001 From: Donncha O Caoimh <5656673+donnchawp@users.noreply.github.com> Date: Tue, 7 May 2024 19:55:02 +0100 Subject: [PATCH] Use unlink() to return true/false --- projects/plugins/super-cache/inc/boost.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/plugins/super-cache/inc/boost.php b/projects/plugins/super-cache/inc/boost.php index c2e0926906de0..b11edee8ac0da 100644 --- a/projects/plugins/super-cache/inc/boost.php +++ b/projects/plugins/super-cache/inc/boost.php @@ -48,5 +48,6 @@ function wpsc_delete_boost_loader_form() { */ function wpsc_delete_boost_loader() { global $wpsc_advanced_cache_filename; - return wp_delete_file( $wpsc_advanced_cache_filename ); + // Cannot use wp_delete_file() because it doesn't return a boolean. + return @unlink( $wpsc_advanced_cache_filename ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink }