I am using the wp_new_comment()
(previously used the wp_insert_comment()
) function.
I now notice that I get a
Notice: Undefined index: comment_author_url
and a:
Notice: Undefined index: comment_author_email
in the wp-includes/comment.php
file.
Previously, when using wp_insert_comment()
I left these fields in the arguments blank (ie: left them out of the arguments array) and I didn't receive any notices.
How come I am receiving a notice for these arguments now? Are these arguments required for the wp_new_comment()
function but not for wp_insert_comment()
? If so, why?
All of my comments are written by registered users. I can simply enter empty strings for these fields or use the user's registration information to populate the fields. Any suggestions regarding this?
(my comment form is taken from the plugin I'm using).
Thanks.
comment_author_url
norcomment_author_email
. It has comment_post_ID, comment_content, comment_parent, comment_type, user_id, comment_author.