diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-03-25 15:25:06 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-03-25 15:25:06 +0100 |
commit | d81cdcbe883b334ae08f14d4a411bfd037da9f24 (patch) | |
tree | b06f8b7b7bdc258194fc2faf0d15fc9c3b884759 /lib/private/Template/JSCombiner.php | |
parent | 4ea79a5bbe5686ded2ba3172fab17d4169c6d562 (diff) | |
download | nextcloud-server-d81cdcbe883b334ae08f14d4a411bfd037da9f24.tar.gz nextcloud-server-d81cdcbe883b334ae08f14d4a411bfd037da9f24.zip |
Don't run JSCombiner when not installed
When the instance is not installed don't run the JSCombiner as the appdata folder does not yet exist.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Template/JSCombiner.php')
-rw-r--r-- | lib/private/Template/JSCombiner.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index a7bbf129e01..9f92813f905 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -45,11 +45,10 @@ class JSCombiner { protected $config; /** - * JSCombiner constructor. - * * @param IAppData $appData * @param IURLGenerator $urlGenerator * @param ICache $depsCache + * @param SystemConfig $config */ public function __construct(IAppData $appData, IURLGenerator $urlGenerator, @@ -68,7 +67,7 @@ class JSCombiner { * @return bool */ public function process($root, $file, $app) { - if ($this->config->getValue('debug')) { + if ($this->config->getValue('debug') || !$this->config->getValue('installed')) { return false; } @@ -183,7 +182,11 @@ class JSCombiner { * @return string[] */ public function getContent($root, $file) { + /** @var array $data */ $data = json_decode(file_get_contents($root . '/' . $file)); + if(!is_array($data)) { + return []; + } $path = explode('/', $file); array_pop($path); |