From e5b3aea2584e3ca9a8b5c2009460d53788acbfbb Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 29 Apr 2019 14:43:18 -0600 Subject: [PATCH] Fix forced preferences stored nulls --- admin/inc/class.admin_cmd_edit_preferences.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/inc/class.admin_cmd_edit_preferences.inc.php b/admin/inc/class.admin_cmd_edit_preferences.inc.php index 5eaf79654c..c566ec598c 100644 --- a/admin/inc/class.admin_cmd_edit_preferences.inc.php +++ b/admin/inc/class.admin_cmd_edit_preferences.inc.php @@ -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'); }