Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Dries CreditAttribution: Dries commentedThe 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.)
Comment #2
jbond CreditAttribution: jbond commentedYes. looks good now.
Comment #3
(not verified) CreditAttribution: commentedAutomatically closed due to inactivity (marked fixed for 14 days).