trying to create a custom content type on user register in a function called by workflow_ng
but when i execute it i get the following standard messages

# The content fields table content_type_someones_store has been created.
# The content type someone1's Garage Sale has been added.
# Added field Image.
# The field Image (field_image_cache) was added to the content type someone1's Garage Sale, but an error has occured updating the field settings.
Please check the errors displayed for more details.

and the following errors



    * An illegal choice has been detected. Please contact the site administrator.
    * warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/g/r/a/graves2729/html/swapnshop/sites/all/modules/cck/content_admin.inc on line 921.
    * warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/g/r/a/graves2729/html/swapnshop/sites/all/modules/cck/content_admin.inc on line 922.

the code is as follows

function on_register($account) {
	$name = ereg_replace("[^A-Za-z0-9]", "", $account->name );
	$values['type_name']='<create>';
	$values['macro']="\$content[type]  = array (
  'name' => '".$name."\'s Garage Sale',
  'type' => '".$name."s_store',
  'description' => 'this is ".$name."\'s stuff',
  'title_label' => 'Name',
  'body_label' => 'Description',
  'min_word_count' => 0,
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'promote' => true,
    'sticky' => false,
    'revision' => false,
  ),
  'comment' => 2,
  'upload' => 1,
  'event_nodeapi' => 'never',
  'old_type' => '".$name."s_store',
  'orig_type' => '".$name."s_store',
  'module' => 'uc_product',
  'custom' => true,
  'modified' => false,
  'locked' => true,
  'reset' => 'Reset to defaults',
  'fivestar' => 0,
  'fivestar_stars' => 5,
  'fivestar_labels_enable' => 1,
  'fivestar_label_0' => 'Cancel rating',
  'fivestar_label_1' => 'Poor',
  'fivestar_label_2' => 'Okay',
  'fivestar_label_3' => 'Good',
  'fivestar_label_4' => 'Great',
  'fivestar_label_5' => 'Awesome',
  'fivestar_label_6' => 'Give it @star/@count',
  'fivestar_label_7' => 'Give it @star/@count',
  'fivestar_label_8' => 'Give it @star/@count',
  'fivestar_label_9' => 'Give it @star/@count',
  'fivestar_label_10' => 'Give it @star/@count',
  'fivestar_style' => 'average',
  'fivestar_text' => 'dual',
  'fivestar_title' => 1,
  'fivestar_feedback' => 1,
  'fivestar_unvote' => 0,
  'fivestar_position_teaser' => 'hidden',
  'fivestar_position' => 'below',
  'fivestar_comment' => 0,
  'print_display' => 1,
  'print_display_comment' => 0,
  'print_display_urllist' => 1,
  'print_mail_display' => 1,
  'print_mail_display_comment' => 0,
  'print_mail_display_urllist' => 1,
);
\$content[fields]  = array (
  0 => 
  array (
    'widget_type' => 'image',
    'label' => 'Image',
    'weight' => '-2',
    'max_resolution' => 0,
    'max_filesize' => 0,
    'max_number_images' => 0,
    'image_path' => '',
    'file_extensions' => 'jpg jpeg png gif',
    'custom_alt' => 1,
    'custom_title' => 1,
    'description' => '',
    'group' => false,
    'required' => 0,
    'multiple' => 1,
    'use_default_image' => '',
    'default_image_upload' => '',
    'default_image' => NULL,
    'field_name' => 'field_image_cache',
    'field_type' => 'image',
    'module' => 'imagefield',
    'display_settings' => 
    array (
      'label' => 
      array (
        'format' => 'hidden',
      ),
      'teaser' => 
      array (
        'format' => 'hidden',
      ),
      'full' => 
      array (
        'format' => 'hidden',
      ),
    ),
  ),
);";
drupal_execute('content_copy_import_form', $values);
}