Skip to content

Commit

Permalink
Standardise filepath separators to / (Fixes moodlehq#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 1, 2024
1 parent 82a667f commit 4e7c680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moodle/Util/Docblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public static function isValidTag(
$tag = ltrim($tokens[$tagPtr]['content'], '@');
if (array_key_exists($tag, self::$validTags)) {
if (array_key_exists($tag, self::$pathRestrictedTags)) {
$file = $phpcsFile->getFilename();
$file = str_replace(DIRECTORY_SEPARATOR, "/", $phpcsFile->getFilename());
foreach (self::$pathRestrictedTags[$tag] as $path) {
if (preg_match($path, $file)) {
return true;
Expand Down

0 comments on commit 4e7c680

Please sign in to comment.