Common.inc, line 1039, function drupal_attributes($attributes = 0) returns nothing if $attributes is not an array. I'd recommend adding

} else {
return $attributes;
}

This was noticed when profile avatar upload failed, because form option "enctype=\"multipart/form-data\" wasn't being used, because drupal_attributes didn't return anything in the middle of function form().

Comments

Dries’s picture

Assigned: Unassigned » Dries

The proper thing to do is to fix the caller in the user module; not to put a hack the callee, drupal_attributes(). I just fixed this in the HEAD branch. Can you confirm that uploading avatars works?

(The banner module in the contributions repository needs fixing as well.)

jbond’s picture

Yes. looks good now.

Anonymous’s picture

Automatically closed due to inactivity (marked fixed for 14 days).