fixed notice index undefined

This commit is contained in:
Bachir Soussi Chiadmi 2021-06-28 11:05:43 +02:00
parent 883a9d29aa
commit bc6d04ef48

View File

@ -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;