diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-14 17:55:04 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-14 17:55:27 +0200 |
commit | 110e6e4f95f4dc9850ad849abd79ceb70258c291 (patch) | |
tree | c25373197b7b6cc9b52ed0ab96656686d57909bf /build | |
parent | 177c455f04f95d5ba7f48c16fea960dceecc2635 (diff) | |
download | php-git-110e6e4f95f4dc9850ad849abd79ceb70258c291.tar.gz |
Make gen_stub.php compatible with PHP 7.1 again
Not worth bumping requirements over this...
Diffstat (limited to 'build')
-rwxr-xr-x | build/gen_stub.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build/gen_stub.php b/build/gen_stub.php index 131f60bab7..d784907048 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -560,8 +560,8 @@ function parseDocComment(DocComment $comment): array { $tags = []; foreach (explode("\n", $commentText) as $commentLine) { $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))?$/'; - if (preg_match($regex, trim($commentLine), $matches, PREG_UNMATCHED_AS_NULL)) { - $tags[] = new DocCommentTag($matches[1], $matches[2]); + if (preg_match($regex, trim($commentLine), $matches)) { + $tags[] = new DocCommentTag($matches[1], $matches[2] ?? null); } } |