Ensure a new asset revision identifier is generated if there is none

This commit is contained in:
Toby Zerner 2016-01-02 14:59:09 +10:30
parent 1aaf588341
commit a719d4109f

View File

@ -75,7 +75,7 @@ class RevisionCompiler implements CompilerInterface
$ext = pathinfo($this->filename, PATHINFO_EXTENSION); $ext = pathinfo($this->filename, PATHINFO_EXTENSION);
$file = $this->path.'/'.substr_replace($this->filename, '-'.$old, -strlen($ext) - 1, 0); $file = $this->path.'/'.substr_replace($this->filename, '-'.$old, -strlen($ext) - 1, 0);
if ($this->watch) { if ($this->watch || ! $old) {
$cacheDifferentiator = [$this->getCacheDifferentiator()]; $cacheDifferentiator = [$this->getCacheDifferentiator()];
foreach ($this->files as $source) { foreach ($this->files as $source) {