]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7848 Database presets import breaks non-null restriction on description
authorskodak <skodak>
Fri, 8 Dec 2006 22:23:45 +0000 (22:23 +0000)
committerskodak <skodak>
Fri, 8 Dec 2006 22:23:45 +0000 (22:23 +0000)
mod/data/preset.php

index 33e1aab44a227f4a0fbe0add262c4c6a858a14a5..30c49d6c21a1e3bd7760ce4bb99fdfc3ed304e7c 100644 (file)
@@ -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();