Skip to content

Commit

Permalink
Use str_replace for finding actual file names
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Oct 11, 2024
1 parent 8141398 commit 9fa2e5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Checker/Checks/Plugin_Repo/File_Type_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit 9fa2e5e

Please sign in to comment.