From bc6d04ef4836a821724b183289335c7361d569f6 Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 28 Jun 2021 11:05:43 +0200 Subject: [PATCH] fixed notice index undefined --- web/themes/custom/popsu/popsu.theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/themes/custom/popsu/popsu.theme b/web/themes/custom/popsu/popsu.theme index 64919d48..c7b9127b 100644 --- a/web/themes/custom/popsu/popsu.theme +++ b/web/themes/custom/popsu/popsu.theme @@ -76,8 +76,8 @@ function popsu_preprocess_region(&$variables) { function popsu_preprocess_views_view_field(&$variables){ // check if link to entoty option is true - $settings = $variables['field']->options['settings']; - if (isset($settings['link_to_entity']) && $settings['link_to_entity']) { + $settings = isset($variables['field']->options['settings']) ? $variables['field']->options['settings'] : false; + if ($settings && isset($settings['link_to_entity']) && $settings['link_to_entity']) { // get the entity and build the classes $entity = $variables['row']->_entity; // $target_id = $entity;