Problem/Motivation

If NULL is passed to _name_format_add_component(), it will eventually make its way to strlen(), which raises a deprecation message in PHP 8.0. The first conditional in _name_format_apply_modifiers() appears to be written incorrectly.

Proposed resolution

In _name_format_apply_modifiers(), only operate on values that are non-empty strings.

Issue fork name-3253598

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland created an issue. See original summary.

Liam Morland’s picture

Assigned: Liam Morland » Unassigned
Status: Active » Needs review

  • Liam Morland committed 82bee53 on 7.x-1.x
    Issue #3253598: Prevent NULL from being passed to strlen()
    
Liam Morland’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.