Deprecated function: Passing null to strip_tags in /Services/TooltipManager.php when the term has no description

Created on 11 May 2023, over 1 year ago
Updated 26 July 2023, over 1 year ago

Problem/Motivation

Receiving this error everytime I save or view a content with a tooltip taxonomy after enabling and configuring this module:
Deprecated function: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\tooltip_taxonomy\Services\TooltipManager->addVocabularyReplacement() (line 323 of modules/contrib/tooltip_taxonomy/src/Services/TooltipManager.php).

I think it's related to a recent update (but I can't track which one) because just a few days ago when I first tested the module I don't remember getting it.
I tried to uninstall, install, reconfigure (even the text format (with CKEditor) and I always get the error on a clean site.
The error message fires even when just viewing a content with a tooltip (and tooltip shows correctly).

Steps to reproduce

Add a core's Tags term, enable this module, configure it for Tags and Article content type, add <span class="tx-tooltip tx-tooltip-text"> in the CKEditor "Source editing" field of the Basic HTML text format, add Article node, put the tag term name in the Body field, save => get the error, reload the page => error

Drupal 10.0.9
PHP 8.1.13

Thank you for this otherwise great module :)

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024