Skip to content
Snippets Groups Projects
Commit ea1278e8 authored by Marc van Gend's avatar Marc van Gend
Browse files

Issue #1924396 by NaX, marcvangend, jawad.shah: Fixed '#bundle' in...

Issue #1924396 by NaX, marcvangend, jawad.shah: Fixed '#bundle' in 'fieldblock_field_attach_view_alter()' undefined .
parent d2503020
No related branches found
No related tags found
No related merge requests found
...@@ -161,6 +161,11 @@ function fieldblock_block_view($delta = '') { ...@@ -161,6 +161,11 @@ function fieldblock_block_view($delta = '') {
* array. * array.
*/ */
function fieldblock_field_attach_view_alter(&$output, $context) { function fieldblock_field_attach_view_alter(&$output, $context) {
// Do nothing if essential information is missing.
if (!isset($output['#bundle'], $context['entity_type'], $context['view_mode'])) {
return;
}
$entity_type = $context['entity_type']; $entity_type = $context['entity_type'];
$bundle = $output['#bundle']; $bundle = $output['#bundle'];
$view_mode = $context['view_mode']; $view_mode = $context['view_mode'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment