Problem/Motivation

In a PHP 8.1 environment, when I render a Bibleref field, the site prints this warning:

Deprecated function: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Html::escape() (line 424 of core/lib/Drupal/Component/Utility/Html.php).

Proposed resolution

Use empty strings instead of null values in the field formatter.

Remaining tasks

Needs review and testing.

Issue fork bibleref-3310769

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

krisahil created an issue. See original summary.

krisahil’s picture

Status: Active » Needs review

  • krisahil committed 45943e4 on 8.x-1.x
    #3310769: Use empty strings instead of nulls in field formatter.
    
tikaszvince’s picture

Status: Needs review » Fixed

Hi @krisahil,

thank you this fix.
I've just released 1.0-rc2 contains this fix.

Status: Fixed » Closed (fixed)

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