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.
If you remove the comment form with alters you get notices. This patch is utterly trivial as !empty and (implicit) cast to bool always lead to the same result just without the notices.
Comment | File | Size | Author |
---|---|---|---|
#5 | drupal.comment-form-empty.5.patch | 762 bytes | sun |
comment_form_empty.patch | 1.03 KB | chx | |
Comments
Comment #1
yched CreditAttribution: yched commentedLooks like a no-brainer - but :
Do we clutter templates with isset()s, or make sure the variable is at least an empty string / empty array ?
Comment #2
Dries CreditAttribution: Dries commentedThe majority of the template files don't use isset()s, but it is not entirely consistent.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedseems like this is pretty clear and committable as is.
Comment #4
sunyched and Dries are right, we don't use !empty() or isset() in template files.
http://api.drupal.org/api/drupal/modules--comment--comment.module/functi...
Comment #5
sunComment #6
yched CreditAttribution: yched commentedLooks nicer :-)
Comment #7
chx CreditAttribution: chx commentedAWESOME thanks.
Comment #8
webchickCommitted to HEAD. Thanks!