Skip to content

Commit 92c0443

Browse files
authored
Fix regex matching for removed functions (#483)
1 parent d43727a commit 92c0443

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

generator/src/DocPage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ private function getIsDeprecated(string $file): bool
3232
}
3333
}
3434

35-
if (preg_match('/&warn\.removed\.function-(\d+-\d+-\d+)/', $file, $matches) && isset($matches[2])) {
36-
$removedVersion = $matches[2];
35+
if (preg_match('/&warn\.removed\.function-(\d+-\d+-\d+)/', $file, $matches)) {
36+
$removedVersion = $matches[1];
3737
[$major, $minor] = explode('-', $removedVersion);
3838
if ($major < 7 || ($major == 7 && $minor == 0)) {
3939
return true;

0 commit comments

Comments
 (0)