Skip to content

Commit

Permalink
Use unlink() to return true/false
Browse files Browse the repository at this point in the history
  • Loading branch information
donnchawp committed May 7, 2024
1 parent 1a817b6 commit 0ea2922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/plugins/super-cache/inc/boost.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 0ea2922

Please sign in to comment.