From 9fa2e5e61f6858cd83a9a0e125d9275e19a8c681 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Fri, 11 Oct 2024 20:28:47 +0545 Subject: [PATCH] Use str_replace for finding actual file names --- includes/Checker/Checks/Plugin_Repo/File_Type_Check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php b/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php index fa4000dc..1ac6a06f 100644 --- a/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php +++ b/includes/Checker/Checks/Plugin_Repo/File_Type_Check.php @@ -264,7 +264,7 @@ protected function look_for_badly_named_files( Check_Result $result, array $file $files = array_map( function ( $file ) use ( $plugin_path ) { - return substr( $file, strlen( $plugin_path ) ); + return str_replace( $plugin_path, '', $file ); }, $files );