1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 07:24:27 +02:00

Fix detection of whether or not an asset file is "empty"

We can't rely on files/strings for this, since the Locale JsCompiler doesn't use either, but still has content.
This commit is contained in:
Toby Zerner
2016-05-27 12:20:14 +09:30
parent 0b0c1055d6
commit 96eda5cfeb
2 changed files with 6 additions and 2 deletions

View File

@@ -92,10 +92,10 @@ class RevisionCompiler implements CompilerInterface
$file = $this->path.'/'.substr_replace($this->filename, '-'.$current, -strlen($ext) - 1, 0);
if ($this->files || $this->strings) {
if ($content = $this->compile()) {
$this->putRevision($current);
file_put_contents($file, $this->compile());
file_put_contents($file, $content);
} else {
return;
}