Bladeren bron

php notice fixe

bach 2 jaren geleden
bovenliggende
commit
f5a36bcee1
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      web/themes/custom/popsu/popsu.theme

+ 2 - 2
web/themes/custom/popsu/popsu.theme

@@ -85,8 +85,8 @@ function popsu_preprocess_views_view_field(&$variables){
 
     // add new classes to the url (without overwriting existing once)
     $options = $url->getOptions();
-    if($attributes = $options['attributes']){
-      if($classes = $attributes['class']){
+    if(isset($options['attributes']) && $attributes = $options['attributes']){
+      if(isset($attributes['class']) && $classes = $attributes['class']){
         $attributes['class'] +=  $new_classes;
       }else{
         $attributes['class'] = $new_classes;