Commit 668b4c8a authored by git's avatar git Committed by pifagor

Issue #1939108 by nickonom, andrewmacpherson, alex_optim: Undefined index in...

Issue #1939108 by nickonom, andrewmacpherson, alex_optim: Undefined index in field_formatter_class_preprocess_field()
parent 8c28a886
......@@ -60,10 +60,10 @@ function field_formatter_class_field_formatter_settings_form_alter(&$settings_fo
* according to the field formatter settings.
*/
function field_formatter_class_preprocess_field(&$variables, $hook) {
$entity_type = $variables['element']['#entity_type'];
$field_name = $variables['element']['#field_name'];
$bundle = $variables['element']['#bundle'];
$view_mode = $variables['element']['#view_mode'];
$entity_type = !empty($variables['element']['#entity_type']);
$field_name = !empty($variables['element']['#field_name']);
$bundle = !empty($variables['element']['#bundle']);
$view_mode = !empty($variables['element']['#view_mode']);
if (isset($variables['element']['#object'])) {
$object = $variables['element']['#object'];
}
......
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