Commit 56b496ff authored by KarenS's avatar KarenS
Browse files

Issue #1039466 Make sure number migration code does not break when migrating a...

Issue #1039466 Make sure number migration code does not break when migrating a field that has a custom number formatter.
parent d28bbf01
......@@ -150,10 +150,11 @@ function content_migrate_number_instance_alter(&$instance_value, $field_value) {
),
);
foreach ($instance_value['display'] as $context => $settings) {
$instance_value['display'][$context]['type'] = $new_type[$settings['type']];
$instance_value['display'][$context]['settings'] = $new_settings[$settings['type']];
if (array_key_exists($settings['type'], $new_type)) {
$instance_value['display'][$context]['type'] = $new_type[$settings['type']];
$instance_value['display'][$context]['settings'] = $new_settings[$settings['type']];
}
}
break;
}
}
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