Issue #188: Don't send empty descriptions to check_markup.#189
Issue #188: Don't send empty descriptions to check_markup.#189argiepiano merged 1 commit intobackdrop-contrib:1.xfrom
Conversation
| return count(taxonomy_select_nodes($term->tid)); | ||
|
|
||
| case 'description': | ||
| if (empty($term->description)) { |
There was a problem hiding this comment.
Technically, the problem only happens if $term->description is NULL, not when it's empty. Can you please change empty() to is_null()?
There was a problem hiding this comment.
@argiepiano I don't mind changing it, but is there any value in proceeding if it is empty?
There was a problem hiding this comment.
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
Fixes #188