From 4549c5195962f3c97f41445025fe79198d328529 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Tue, 24 May 2016 17:12:08 +0100 Subject: [PATCH] Deal with cases when we have no settings properly --- app/Foundation/Providers/ConfigServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Foundation/Providers/ConfigServiceProvider.php b/app/Foundation/Providers/ConfigServiceProvider.php index b7665ab7..b6d810e7 100644 --- a/app/Foundation/Providers/ConfigServiceProvider.php +++ b/app/Foundation/Providers/ConfigServiceProvider.php @@ -40,9 +40,11 @@ class ConfigServiceProvider extends ServiceProvider $cache = false; } - $this->app->terminating(function () use ($path) { + $this->app->terminating(function () use ($cache, $path) { if ($this->app->setting->stale()) { $this->app->files->put($path, 'app->setting->all(), true).';'.PHP_EOL); + } elseif ($cache === false) { + $this->app->files->put($path, '