This small fix prevents that the forum frontend breaks whenever

custom_less is NULL or unavailable in the database. We cannot rely
on this value to exist or is incorrectly set to null and thus
completely bricking the app.
This commit is contained in:
Daniël Klabbers 2019-04-12 14:10:20 +02:00
parent d3a5c91845
commit bf2c5a5564

View File

@ -94,7 +94,7 @@ class ForumServiceProvider extends AbstractServiceProvider
$assets->css(function (SourceCollector $sources) {
$sources->addFile(__DIR__.'/../../less/forum.less');
$sources->addString(function () {
return $this->app->make(SettingsRepositoryInterface::class)->get('custom_less');
return $this->app->make(SettingsRepositoryInterface::class)->get('custom_less') ?? '';
});
});