Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Introduced
Branch: 7.x-3.x
Release: 7.x-3.0
Policy
In Drupal 7+, all classes should be array of individual class strings.
This project is, in fact, following established guidelines for render array attribute classes:
https://drupal.org/update/modules/6/7#class_attribute_array
#326539: Convert 'class' attribute to use an array, not a string
Please find the offending module and file an issue in their issue queue to fix it.
Comment | File | Size | Author |
---|
Comments
Comment #1
dqdComment #2
dqdchanging bootstrap/theme/system/image.vars.php
to:
... solved it. But this will overwrite the complete values regarding the key
['class']
, not sure if this is wanted. Also I don't know why we have a double if here instead of an elseif ... Let me know what you think. Thanks ...Comment #3
dqdComment #4
dqdComment #5
dqdComment #6
dqdComment #7
markhalliwellSee the issue summary update above. I am making this issue the "go to" for this error.
Comment #8
markhalliwellComment #9
markhalliwellComment #10
markhalliwellComment #11
gollyg CreditAttribution: gollyg commentedI think that this may be an issue with the bootstrap textfield.func.php file.
It is calling drupal_attributes() early in the theming process. This function modifies the contents of the attribute array by referring to values by reference. This leads to the array structure changing. Later in the bootstrap function we are relying on the attribute array to be unchanged.
I have added a patch which creates a clone of the array, and passes the clone to the drupal_attributes function.
Comment #12
markhalliwellNULL
to an array. To get around that you'd just do something like:Comment #13
markhalliwellComment #14
markhalliwellComment #15
markhalliwellClosing issue