Problem/Motivation

In PHP 8.1, passing `null` to internal function parameters when they are not explicitly declared nullable results in a deprecation notice.

Steps to reproduce

Use Drupal 7 on PHP 8.1.

Proposed resolution

Correct the function calls that cause deprecation notices by setting the correct default parameter, replacing `null`.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

N/A.

Release notes snippet

Details:
- RFC
- PHP 8.1: Passing null to non-nullable internal function parameters is deprecated

Issue fork drupal-3241422

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:

Comments

Ayesh created an issue. See original summary.

mcdruid made their first commit to this issue’s fork.

mcdruid’s picture

Status: Active » Needs review

  • mcdruid committed 71626aa on 7.x
    Issue #3241422 by mcdruid, Ayesh: [PHP 8.1] Passing null to internal...
mcdruid’s picture

Status: Needs review » Fixed

Thank you!

Status: Fixed » Closed (fixed)

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

mpp’s picture