Problem/Motivation

After upgrading the PHP version to 8.1.x and Drupal core version to 10.1.x the message trim(): passing null to parameter #1 ($string) of type string is deprecated appears.

Steps to reproduce

On a Drupal project with core version 10.1.8 and PHP version 8.1.27 try to edit the Media library view and then the warning message is displayed.

Proposed resolution

I will add a small patch as a temporary solution with will resolve this warning in a comment below.

Comments

rastepanyan created an issue. See original summary.

rastepanyan’s picture

StatusFileSize
new619 bytes
cilefen’s picture

Category: Task » Bug report
Status: Active » Needs review
Issue tags: +Needs steps to reproduce

Is this reproducible on a freshly-installed Drupal site?

needs-review-queue-bot’s picture

Status: Needs review » Needs work

The Needs Review Queue Bot tested this issue.

While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

rastepanyan’s picture

I have tested it on a current project after Drupal 9 core upgrade to Drupal 10.

prabuela’s picture

Assigned: Unassigned » prabuela
prabuela’s picture

Assigned: prabuela » Unassigned
Status: Needs work » Needs review
StatusFileSize
new653 bytes
smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +Needs tests

Please include interdiffs with patches as we don't know what was changed., could be the same as #2

Was previously tagged for steps to reproduce which is needed first

Will need test coverage.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

It has been over a year and the cause of the issue hasn't been supplied. Therefor, I am closing this issue. If that can be supplied to do here, then comment and change the issue status to 'Active'.