Problem/Motivation

The above deprecated error message is triggered under PHP 8.1+.

Steps to reproduce

Just enable environment_indicator 4.0.x under PHP 8.1+. Do not set the "environment_indicator.current_release" setting. (The recommended way to add information about your release is to set the "environment_indicator.current_release" state. Use your git hooks to set the state using drush: drush sset environment_indicator.current_release v1.2.44).

Proposed resolution

Replace by !empty() the strlen() calls used just to check if length > 0.

Remaining tasks

Provide a patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

interdruper created an issue. See original summary.

interdruper’s picture

Status: Active » Needs review
StatusFileSize
new643 bytes

Patch attached.

bohus ulrych’s picture

Thanks. It works well with 4.0.4

bobooon’s picture

Confirmed #2 resolves the PHP warnings.

siliconmeadow’s picture

Status: Needs review » Reviewed & tested by the community

Third confirmation that #2 resolves the PHP warning re: strlen() deprecation.

  • e0ipso committed 6de5964 on 4.x authored by interdruper
    Issue #3260279 by interdruper, Bohus Ulrych, robphillips, siliconmeadow...
e0ipso’s picture

Status: Reviewed & tested by the community » Fixed

Merged. Thanks everyone!

Status: Fixed » Closed (fixed)

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