Fixes #14929: Ensure trailing ; on combining files with asset command to fix compiler failures

This commit is contained in:
Hisateru Tanaka
2017-10-07 05:31:37 +09:00
committed by Alexander Makarov
parent 6bde69aa96
commit 6e8cc4c151
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.13 under development
------------------------
- Enh #14929: Ensure trailing `;` on combining files with `asset` command to fix compiler failures (tanakahisateru)
- Bug #14016: Fixed empty messages marked as unused in PHP and PO sources when extracted with message command when `markUnused` is `false` (samdark)
- Enh #9438: `yii\web\DbSession` now relies on error handler to display errors (samdark)
- Bug #6226: Fix fatal symlink error when publishing in multi threaded environments (dynasource)

View File

@ -568,8 +568,12 @@ EOD;
{
$content = '';
foreach ($inputFiles as $file) {
$fileContent = rtrim(file_get_contents($file));
if (substr($fileContent, -1) !== ';') {
$fileContent .= ';';
}
$content .= "/*** BEGIN FILE: $file ***/\n"
. file_get_contents($file)
. $fileContent . "\n"
. "/*** END FILE: $file ***/\n";
}
if (!file_put_contents($outputFile, $content)) {