#519358: Form enctype attribute is set incorrectly.
authorNathan Haug
Sat, 25 Jul 2009 04:10:49 +0000 (04:10 +0000)
committerNathan Haug
Sat, 25 Jul 2009 04:10:49 +0000 (04:10 +0000)
filefield.module

index 96f83a1..2caafb5 100644 (file)
@@ -307,7 +307,7 @@ function filefield_widget(&$form, &$form_state, $field, $items, $delta = 0) {
   if (empty($form['#validate']) || !in_array('filefield_node_form_validate', $form['#validate'])) {
     $form['#validate'][] = 'filefield_node_form_validate';
   }
-  $form['#attributes'] = array('enctype' => 'multipart/form-data');
+  $form['#attributes']['enctype'] = 'multipart/form-data';
 
   module_load_include('inc', 'filefield', 'field_widget');
   module_load_include('inc', $field['widget']['module'], $field['widget']['module'] .'_widget');