Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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)
Comment | File | Size | Author |
---|---|---|---|
#8 | strip_tags-passing-null-to-parameter.patch | 891 bytes | River Zhao |
Comments
Comment #2
DuaelFrThis should have been fixed by #3253545: Drupal 9.3 fixes and PHP 8.1
Comment #3
Belba CreditAttribution: Belba commentedThe version I have is 9.3.5 and the PHP version 8.1.1
and the error is still there.
Comment #4
DuaelFrWhich 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.
Comment #5
jakegibs617 CreditAttribution: jakegibs617 as a volunteer and commented"Passing null to parameter #1"
I think you just need to add (string)
instead of
strip_tags($foobar)
change to
strip_tags((string) $foobar)
Comment #6
River Zhao CreditAttribution: River Zhao commentedMy 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.
Comment #7
River Zhao CreditAttribution: River Zhao commentedComment #8
River Zhao CreditAttribution: River Zhao commented