Fix forced preferences stored nulls

This commit is contained in:
nathangray 2019-04-29 14:43:18 -06:00
parent 98b9de516d
commit e5b3aea258

View File

@ -78,7 +78,7 @@ class admin_cmd_edit_preferences extends admin_cmd
$prefs->read_repository();
foreach($this->set as $name => $value)
{
if (!isset($value) || $value === '')
if (!isset($value) || $value === '' || in_array($this->pref, array('default', 'forced')) && $value === '**NULL**')
{
$prefs->delete($this->app, $name, in_array($this->pref, array('default', 'forced')) ? $this->pref : 'user');
}