From 14a8dda489fcd56ff228b27d49c0010a61f53435 Mon Sep 17 00:00:00 2001 From: Paul Biron Date: Thu, 3 Oct 2024 11:48:41 -0600 Subject: [PATCH 1/2] When checking for excluded files, use the normalized path to ensure that it works in Windows environments. --- includes/Checker/Checks/Abstract_File_Check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Checker/Checks/Abstract_File_Check.php b/includes/Checker/Checks/Abstract_File_Check.php index d693a0376..14c8a527c 100644 --- a/includes/Checker/Checks/Abstract_File_Check.php +++ b/includes/Checker/Checks/Abstract_File_Check.php @@ -304,7 +304,7 @@ private static function get_files( Check_Context $plugin ) { $files_to_ignore = Plugin_Request_Utility::get_files_to_ignore(); foreach ( $files_to_ignore as $ignore_file ) { - if ( str_ends_with( $file, "/$ignore_file" ) ) { + if ( str_ends_with( $file_path, "/$ignore_file" ) ) { $include_file = false; break; } From a179db5aa7b9674026e282f3f49bb76ecd8a20e0 Mon Sep 17 00:00:00 2001 From: Paul Biron Date: Thu, 3 Oct 2024 11:54:53 -0600 Subject: [PATCH 2/2] Remove an unnessary wp_normalize_path() in Abstract_File_Check::get_files(). This probably should have been removed in #592, but was forgotten. --- includes/Checker/Checks/Abstract_File_Check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Checker/Checks/Abstract_File_Check.php b/includes/Checker/Checks/Abstract_File_Check.php index 14c8a527c..9745ba601 100644 --- a/includes/Checker/Checks/Abstract_File_Check.php +++ b/includes/Checker/Checks/Abstract_File_Check.php @@ -311,7 +311,7 @@ private static function get_files( Check_Context $plugin ) { } if ( $include_file ) { - self::$file_list_cache[ $location ][] = wp_normalize_path( $file_path ); + self::$file_list_cache[ $location ][] = $file_path; } } }