summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-20 16:27:35 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-20 16:27:35 +0000
commit424ab5b68efaf90c274310a3cb1019dbd49296b1 (patch)
tree2614b20ac6a7900598337a840c530dd4e90e688e
parent092f7a2671ce20f751b0d2f4ce37b938d4fc5c23 (diff)
downloadbrdo-424ab5b68efaf90c274310a3cb1019dbd49296b1.tar.gz
brdo-424ab5b68efaf90c274310a3cb1019dbd49296b1.tar.bz2
#1002708 by sun: Robustify instance settings instantiation to prevent fatal errors in buggy modules.
-rw-r--r--modules/user/user.module5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 5411d35e9..212724775 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -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,
);
}