Skip to content

Commit

Permalink
PrefixAllGlobals: bugfix
Browse files Browse the repository at this point in the history
Using the `DIRECTORY_SEPARATOR` constant will allow the sniff to be platform agnostic, so the unit tests will work on both Linux, Mac and Windows.
  • Loading branch information
jrfnl committed May 10, 2019
1 parent 77e9959 commit bae3401
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private function is_from_allowed_folder( $path ) {
}

foreach ( $this->allowed_folders as $folder ) {
if ( strrpos( $path, '/' . $folder . '/' ) !== false ) {
if ( strrpos( $path, DIRECTORY_SEPARATOR . $folder . DIRECTORY_SEPARATOR ) !== false ) {
return true;
}
}
Expand Down

0 comments on commit bae3401

Please sign in to comment.