trim(): Passing null to parameter #1 ($string) of type string is deprecated in block_list_override_block_alter()

Created on 20 April 2022, about 2 years ago
Updated 16 August 2023, 11 months ago

With PHP 8.1, I get the following exceptions when I view various pages within the site.

Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in block_list_override_block_alter() (line 16 of modules/contrib/block_list_override/block_list_override.module).
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in block_list_override_block_alter() (line 17 of modules/contrib/block_list_override/block_list_override.module).
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in block_list_override_block_alter() (line 18 of modules/contrib/block_list_override/block_list_override.module).

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Christopher Riley

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡·Greece Pavel Ruban

    convert MR's commit to static file patch for those who need.

  • πŸ‡ΊπŸ‡ΎUruguay rpayanm

    @Pavel Ruban you can use this:

  • Status changed to RTBC over 1 year ago
  • πŸ‡΅πŸ‡ΉPortugal gueguerreiro Lisboa

    Using this PR patch on our PHP 8.1 projects with no issues. Moving to RTBC.

  • πŸ‡¬πŸ‡·Greece Pavel Ruban

    @rpayanm, I don't think so, atm it works, but if branch will be updated on gitlab side (added commit etc) it might break project composer & people working on it eg FE guys will be blocked for a while. We had it many times with gitlab based links, so it's just a snapshot of a piece of code that was verified & applied to our project internally, sorry for noise.

  • Status changed to Needs work 11 months ago
  • heddn Nicaragua

    Is this a duplicate of πŸ“Œ Automated Drupal 10 compatibility fixes Fixed ? Or why is the config empty for these things? The configuration seems to default to a string and the configuration schema also default to a string.

  • Status changed to Closed: duplicate 11 months ago
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Re #12 Yes it is. Closing this as duplicate. The D10 compatibility issue was solved, so the latest version should work without this patch (which doesn't apply anymore anyways).

    Otherwise please reopen and adjust the patch.

Production build 0.69.0 2024