Introduce a ConfigException

This commit is contained in:
Mikael Nordfeldth
2016-03-02 12:33:06 +01:00
parent 9534969c05
commit d6598e790c
3 changed files with 29 additions and 5 deletions

View File

@@ -432,9 +432,13 @@ class GNUsocial
if (common_config('htmlpurifier', 'Cache.DefinitionImpl') === 'Serializer'
&& !is_dir(common_config('htmlpurifier', 'Cache.SerializerPath'))) {
if (!mkdir(common_config('htmlpurifier', 'Cache.SerializerPath'))) {
throw new ServerException('Could not create HTMLPurifier cache dir: '._ve(common_config('htmlpurifier', 'Cache.SerializerPath')));
throw new ConfigException('Could not create HTMLPurifier cache dir: '._ve(common_config('htmlpurifier', 'Cache.SerializerPath')));
}
}
if (!is_array(common_config('public', 'autosource'))) {
throw new ConfigException('Configuration option public/autosource is not an array.');
}
}
/**