Skip to content

Comments

Issue #188: Don't send empty descriptions to check_markup.#189

Merged
argiepiano merged 1 commit intobackdrop-contrib:1.xfrom
laryn:1.x-issue-188
Feb 5, 2026
Merged

Issue #188: Don't send empty descriptions to check_markup.#189
argiepiano merged 1 commit intobackdrop-contrib:1.xfrom
laryn:1.x-issue-188

Conversation

@laryn
Copy link
Member

@laryn laryn commented Feb 4, 2026

Fixes #188

return count(taxonomy_select_nodes($term->tid));

case 'description':
if (empty($term->description)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the problem only happens if $term->description is NULL, not when it's empty. Can you please change empty() to is_null()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@argiepiano I don't mind changing it, but is there any value in proceeding if it is empty?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. First I thought it may be appropriate to run filters for the format even if the value was empty. That's exactly what the field module does for rich text fields even when they are empty, and what taxonomy.tokens.inc currently does also (although it will generate into the same warning you see with entity plus if the value is NULL - another bug for another day).

But then I looked at TaxonomyTermController, and there is a check for empty there before calling check_markup(), so I guess that's OK here too. I'll merge

@argiepiano argiepiano merged commit 1ff95c6 into backdrop-contrib:1.x Feb 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't send empty descriptions to check_markup.

2 participants