Passing null to strtolower() is deprecated

Created on 17 October 2022, over 2 years ago
Updated 2 October 2023, over 1 year ago

Get the following error message after installing this module:
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in

Created a patch which adds a simple isset($machine_name) to the switch statement in block_content_machine_name_preprocess_block(&$variables)

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • @md2 opened merge request.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 5.3 & MySQL 5.5
    last update over 1 year ago
    Patch Failed to Apply
  • Merge request !8Resolve #3315748 "Passing null to 3x" → (Open) created by Lokeshwari
  • 🇷🇴Romania sorina.hriban

    Added if because encountered: Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in block_content_machine_name.module on line 76.

  • Status changed to RTBC 2 months ago
  • 🇬🇷Greece giorgosk Chios, Greece 🇬🇷

    Applied the latest patch from #7 and tested on site already using module
    here is the steps I have tested
    - structure > block layout
    - place a block in any region/ or add new block
    - configure block popup should allow yout edit the machine name. Save
    - create templates/block/block-[MACHINENAME].html.twig
    - make sure that this template is used (might need clear cache)

Production build 0.71.5 2024