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.
Hello there!
How to fix this error.
Notice: Undefined offset: 0 in comment_submit() (line 2197 of mysite.com/modules/comment/comment.module)
I publish comment -> Reload the page = And I'm getiting this error. ->
After second reload of page. No more error.
Thank you!
Comment | File | Size | Author |
---|---|---|---|
#5 | 0001-Issue-2045409-by-alvar0hurtad0-errev-Notice-Undefine.patch | 1.76 KB | alvar0hurtad0 |
Comments
Comment #1
johnvI'm using D7.22, to (although D7.26 is already out.)
This happens when I add a comment with the body field is not required, and I add no comment in the body. (I have other fields attached to the comment that do contain new info)
Comment #2
alvar0hurtad0Comment #3
lurish CreditAttribution: lurish commentedIt's ok!!!
Comment #4
alvar0hurtad0this patch fix also the rest of notices when body isn't on the comment.
Comment #5
alvar0hurtad0Comment #6
alvar0hurtad0Comment #7
johnvLet's close this in favour of #1038652: Notices in comment_submit() and comment_admin_overview() when body field does not exist or is not required, which is much older and has a more complete patch.