MNet upgrade: missing required not null value

The column description in mnet_service table is set to not null and no
value is set for the insert_record(). We must explicitly provide the
empty string if the description is not defined in db/mnet.php file.
This commit is contained in:
David Mudrak 2010-11-10 16:01:23 +00:00
parent 2380ac57d6
commit f4a2817ac5

View File

@ -1507,6 +1507,7 @@ function upgrade_plugin_mnet_functions($component) {
} else {
$serviceobj = new stdClass();
$serviceobj->name = $service['servicename'];
$serviceobj->description = empty($service['description']) ? '' : $service['description'];
$serviceobj->apiversion = $service['apiversion'];
$serviceobj->offer = 1;
$serviceobj->id = $DB->insert_record('mnet_service', $serviceobj);