I've hung my project type admin ui in admin/structure. Everything was working just fine the other day, I could create a project_type, it would save it and show the list of project types available. Now, when I load the create new project type form, enter some values, I get the below error. It is like its trying to use every attribute of every field on my form, in the database query.
Form:
<?php
function project_type_form($form, &$form_state, $project_type, $op = 'edit')
{
if ($op == 'clone')
{
$project_type->name .= ' (cloned)';
$project_type->type = '';
}
$bu_options = entity_load('sponsoring_bu', FALSE, NULL, FALSE);
$opt = entity_to_list_values($bu_options);
$form['business_unit'] = array(
'#title' => t('Business Unit'),
'#type' => 'select',
'#default_value' => $project_type->business_unit,
'#description' => t('The business unit this request form is associated with'),
'#options' => $opt,
'#required' => TRUE
);
$form['label'] = array(
'#title' => t('Name'),
'#type' => 'textfield',
'#default_value' => $project_type->label,
'#description' => t('The human-readable name of this project request type.'),
'#required' => TRUE,
'#size' => 30,
);
$form['type'] = array(
'#type' => 'machine_name',
'#default_value' => isset($project_type->type) ? $project_type->type : '',
'#maxlength' => 32,