From: skodak Date: Fri, 8 Dec 2006 22:23:45 +0000 (+0000) Subject: MDL-7848 Database presets import breaks non-null restriction on description X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0c4fe7d8325200eb46f4ec66cc90473f7788c6aa;p=moodle.git MDL-7848 Database presets import breaks non-null restriction on description --- diff --git a/mod/data/preset.php b/mod/data/preset.php index 33e1aab44a..30c49d6c21 100644 --- a/mod/data/preset.php +++ b/mod/data/preset.php @@ -664,6 +664,9 @@ class PresetImporter { else { include_once("field/$newfield->type/field.class.php"); + if (!isset($newfield->description)) { + $newfield->description = ''; + } $classname = 'data_field_'.$newfield->type; $fieldclass = new $classname($newfield, $this->data); $fieldclass->insert_field();