Commit 49f5d364 by Klimov Paul

#3807: Wrong js/css path composition at `AssetController::buildTarget()` fixed

parent 88c25245
...@@ -302,9 +302,10 @@ class AssetController extends Controller ...@@ -302,9 +302,10 @@ class AssetController extends Controller
$this->compressCssFiles($inputFiles, $tempFile); $this->compressCssFiles($inputFiles, $tempFile);
} }
$outputFile = $target->basePath . '/' . strtr($target->$type, ['{hash}' => md5_file($tempFile)]); $targetFile = strtr($target->$type, ['{hash}' => md5_file($tempFile)]);
$outputFile = $target->basePath . '/' . $targetFile;
rename($tempFile, $outputFile); rename($tempFile, $outputFile);
$target->$type = [$outputFile]; $target->$type = [$targetFile];
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment