From 0c4fe7d8325200eb46f4ec66cc90473f7788c6aa Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 8 Dec 2006 22:23:45 +0000 Subject: [PATCH] MDL-7848 Database presets import breaks non-null restriction on description --- mod/data/preset.php | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.39.5