I was getting a fatal error caused by bootstrap_preprocess_picture since the code was trying to add an array element to what turns out to be a string sometimes. The $variables['attributes']['class'] is sometimes a string, sometimes empty, and sometimes an array, so the patch adds checks for each case.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2835769_picture_class_attr_5.patch | 608 bytes | geoffreyr |
| #2 | bootstrap-add-responsive-class-for-picture-module-2835769-2.patch | 777 bytes | shaundychko |
Comments
Comment #2
shaundychkoComment #3
shaundychkoComment #4
markhalliwellThis is a bug with the picture module then, because it's the one that introduces the
picturetheme hook. It's their responsibility for setting up the variables array appropriately.For example:the majority of what is happening in theme_picture(), should be moved to a new
template_preprocess_picture()function.Comment #5
geoffreyr commentedHere's a patch for Picture module that forces class attributes to an array.
Comment #6
geoffreyr commentedComment #8
attiks commentedCommitted