diff --git a/build/license.php b/build/license.php index 2398b02e0b74f..e0af701f4faa7 100644 --- a/build/license.php +++ b/build/license.php @@ -228,9 +228,10 @@ private function eatOldLicense($source) { private function getCopyrightNotices($path, $file) { $licenseHeaderEndsAtLine = (int)trim(shell_exec("grep -n '*/' $path | head -n 1 | cut -d ':' -f 1")); - $lineByLine = explode(PHP_EOL, $file, $licenseHeaderEndsAtLine); + $lineByLine = explode(PHP_EOL, $file, $licenseHeaderEndsAtLine + 1); $copyrightNotice = []; - foreach ($lineByLine as $line) { + $licensePart = array_slice($lineByLine, 0, 20); + foreach ($licensePart as $line) { if (strpos($line, '@copyright') !== false) { $copyrightNotice[] = $line; }