Deprecated function: explode()

Created on 27 May 2024, 6 months ago
Updated 13 June 2024, 5 months ago

I use bootstrap table and I get below error after latest update.

Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in template_preprocess_views_bootstrap_table() (line 365 of modules/contrib/views_bootstrap/views_bootstrap.theme.inc).

🐛 Bug report
Status

Fixed

Version

5.5

Component

Code

Created by

🇬🇷Greece tarasiadis

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

Merge Requests

Comments & Activities

  • Issue created by @tarasiadis
  • 🇮🇳India deepak5423

    @tarasiadis please write the step to reproduce the error because when I select bootstrap table it shows a different error which is "TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 372 of modules/contrib/views_bootstrap/views_bootstrap.theme.inc)."

  • First commit to issue fork.
  • Pipeline finished with Success
    6 months ago
    Total: 141s
    #183313
  • Status changed to Needs review 6 months ago
  • 🇮🇳India manish-31

    I have opened a Merge Request to fix the warning - "Deprecated function: explode()."

    Also, while reproducing this warning I found that for the first time until we save style settings we get another error - "TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 372 of modules/contrib/views_bootstrap/views_bootstrap.theme.inc)." which gets fixed once we save style settings.

    This MR contains fix for this too. Needs review. Thanks!

  • 🇺🇸United States shelane

    Once an empty string is set (rather than NULL) in the view options, these errors will not occur. This is going to be handled through an update hook in the next release. You can manually edit your view and save the settings to fix this as well.

  • 🇬🇷Greece tarasiadis

    Where I have to write a (space) empty string? In css class option?

  • 🇺🇸United States shelane

    You shouldn't have to add a space to it. But by saving it, it should be saved as an empty string rather than a NULL value (not yet existing in the config).

  • 🇬🇷Greece tarasiadis

    Yes this is works. Thanks. Wait for next release.

  • Status changed to Fixed 6 months ago
  • 🇺🇸United States shelane
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024