Error: [] operator not supported for strings in bootstrap5_add_table_variables() (line 202 of /var/www/drupal.10/html/themes/contrib/bootstrap5/bootstrap5.theme).

Created on 8 March 2023, almost 2 years ago
Updated 18 April 2023, over 1 year ago

Just found the above error in the logs. I assume that it's a similar issue to: https://www.drupal.org/project/bootstrap5/issues/3254815

The problem call here is just below the function fixed in that issue.
There is another similar function function bootstrap5_add_table_striped_variables(&$variables) {} just below as well.
Should all these have a similar fix?

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom donaldp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @donaldp
  • 🇦🇹Austria nofue

    Happened to me here (with D 9.5.7 just installed) followed by a WSOD. The error above got logged, then the crash happened in the very same second, nothing got logged. Don't know if it's related, but hey, I thought I might let you know. Maybe 9.5.7 makes things more serious.

  • Status changed to Needs work over 1 year ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Confirmed! 👍
    got the same while editing node revision.

    Error: [] operator not supported for strings in bootstrap5_add_table_variables() (line 202 of themes/contrib/bootstrap5/bootstrap5.theme)
    
  • @vladimiraus opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia
  • Status changed to Needs work over 1 year ago
  • 🇦🇺Australia jannakha Brisbane!

    failed with:

    Warning: Undefined array key "class" in _bootstrap5_attributes_class_string_to_array() (line 138 of themes/contrib/bootstrap5/bootstrap5.theme).
    _bootstrap5_attributes_class_string_to_array(Array) (Line: 207)
    bootstrap5_preprocess_image(Array, 'image', Array)
    call_user_func_array('bootstrap5_preprocess_image', Array) (Line: 287)
    Drupal\Core\Theme\ThemeManager->render('image', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 39)
    __TwigTemplate_0d4de798bef90c273e820025a1159b32->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Try now.

  • Status changed to Needs review over 1 year ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia
  • Status changed to RTBC over 1 year ago
  • 🇦🇺Australia jannakha Brisbane!

    tested and working

    • VladimirAus committed 0a8056de on 3.0.x
      Issue #3346771 by VladimirAus, jannakha, donaldp, nofue: Error: []...
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Committed! Thank you! 🥃

    • VladimirAus committed 25c61ff3 on 3.0.x
      Issue #3346771 by donaldp, nofue, VladimirAus, jannakha: Error: []...
  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024