diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php index 3ff88a4f0c..ee9fcf6b6b 100644 --- a/framework/console/controllers/AssetController.php +++ b/framework/console/controllers/AssetController.php @@ -302,9 +302,10 @@ class AssetController extends Controller $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); - $target->$type = [$outputFile]; + $target->$type = [$targetFile]; } /**