From 441470ff034614ebfbe3d1c5ae9133f1aa399fa6 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 31 Aug 2006 22:17:47 +0000 Subject: [PATCH] fixed problem with applying of default settings during install - choices can not be constructed yet --- admin/adminlib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/adminlib.php b/admin/adminlib.php index fb20d8cbd5e..7db9e22fefc 100644 --- a/admin/adminlib.php +++ b/admin/adminlib.php @@ -634,7 +634,8 @@ class admin_setting_configselect extends admin_setting { function write_setting($data) { // check that what we got was in the original choices - if (! in_array($data, array_keys($this->choices))) { + // or that the data is the default setting - needed during install when choices can not be constructed yet + if ($data != $this->defaultsetting and ! in_array($data, array_keys($this->choices))) { return 'Error setting ' . $this->visiblename . '
'; }