Drupal 9.3.3
PHP 8

Deprecated function: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\paragraphs\Entity\Paragraph->getTextSummary() (line 740 of modules\contrib\paragraphs\src\Entity\Paragraph.php)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Belba created an issue. See original summary.

DuaelFr’s picture

Status: Active » Closed (duplicate)

This should have been fixed by #3253545: Drupal 9.3 fixes and PHP 8.1

Belba’s picture

The version I have is 9.3.5 and the PHP version 8.1.1
and the error is still there.

DuaelFr’s picture

Which version of the module are you using?
The fix has not been released yet so you need to use the latest dev version or apply the patch I uploaded in the other issue on the 1.12.0 version.

jakegibs617’s picture

"Passing null to parameter #1"

I think you just need to add (string)

instead of
strip_tags($foobar)

change to
strip_tags((string) $foobar)

River Zhao’s picture

My project environment is Drupal9.5.9, PHP8.1; the problem prompt is:
Deprecated function: strip_tags() in Drupal\paragraphs\Entity\Paragraph->getTextSummary(): Passing null to parameter #1 ($string) of type string is deprecated (/var/www/docroot/modules/contrib/paragraphs/ src/Entity/Paragraph.php, line 740).
None of the existing patches can be used, I created a new patch.

River Zhao’s picture

FileSize
680 bytes
River Zhao’s picture

FileSize
891 bytes