Commit 424ab5b6 authored by webchick's avatar webchick
Browse files

#1002708 by sun: Robustify instance settings instantiation to prevent fatal...

#1002708 by sun: Robustify instance settings instantiation to prevent fatal errors in buggy modules.
parent 092f7a26
......@@ -181,8 +181,9 @@ function user_uri($user) {
*/
function user_field_info_alter(&$info) {
// Add the 'user_register_form' instance setting to all field types.
foreach ($info as $field_type => $field_type_info) {
$info[$field_type]['instance_settings'] += array(
foreach ($info as $field_type => &$field_type_info) {
$field_type_info += array('instance_settings' => array());
$field_type_info['instance_settings'] += array(
'user_register_form' => FALSE,
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment