Problem/Motivation

After the latest update I'm getting this error anytime I save a form...

Deprecated function: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\choices_autocomplete\Plugin\Field\FieldWidget\EntityReferenceChoicesWidget->formElement() (line 239 of modules/contrib/choices_autocomplete/src/Plugin/Field/FieldWidget/EntityReferenceChoicesWidget.php).

Anyone else getting something similar?

CommentFileSizeAuthor
#2 3340886-2.patch828 bytesadil_siddiqui

Comments

chucksimply created an issue. See original summary.

adil_siddiqui’s picture

Status: Active » Needs review
StatusFileSize
new828 bytes

Patch created

chucksimply’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

  • c6512309 committed on 1.x
    Issue #3340886 by robphillips,Adil_Siddiqui: Deprecated function:...
bobooon’s picture

Status: Reviewed & tested by the community » Fixed

PHP 8.1 deprecation. Changed the default value from NULL to an empty string.

chucksimply’s picture

Issue still persists in the 1.1.15 update without the patch.

chucksimply’s picture

Status: Fixed » Needs review
bobooon’s picture

Status: Needs review » Postponed (maintainer needs more info)

Could you please provide steps to replicate the issue?

bobooon’s picture

Status: Postponed (maintainer needs more info) » Needs work
chucksimply’s picture

So it's just when I edit a previously created node. As soon as I open the edit page I get the same error.

Patch fixes it though.

  • 76e9266e committed on 1.x
    Issue #3340886 by robphillips, chucksimply: Deprecated function:...
bobooon’s picture

Status: Needs work » Fixed

Turns out the original fix only works for new installs. New release fixes it for existing installs.

chucksimply’s picture

Awesome thanks @robphillips. No error with new release.

Status: Fixed » Closed (fixed)

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