Closed (fixed)
Project:
Barrio Bootstrap 5 Theme
Version:
8.x-4.19
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2019 at 16:50 UTC
Updated:
20 Mar 2019 at 12:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hatuhay commentedThe code was updated with this issue.
Undefined index: class in bootstrap_barrio_preprocess_html() (3031270)
If you can confirm your solution and provide a patch I will me more than happy to commit
Comment #3
guaneagler commentedJust remove the code this patch added.
For the $variables['attributes'], it may be an array or a object of 'Drupal\Core\Template\Attribute'. Both can set class by access $variables['attributes']['class'].
For my site, $variables['attributes'] is an array when is not logged in and is an object when is logged in.
Comment #5
hatuhay commentedPatch in #3, will only drive into inconsistency errors.
The $variables['attributes']['class'] must be tested and initialized if do not exist.
Comment #6
cqbent commentedHere's the patch I created for fixing this issue by replacing the !is_array || !array_key_exists with the more generic !isset
Comment #8
weynhamzUpload patch for the accepted commit.
Comment #9
morbus iffThis looks like it's been committed, so setting to Fixed.