[wp-trac] [WordPress Trac] #39730: Checking if wp_new_comment() return value is a WP_Error

WordPress Trac noreply at wordpress.org
Wed Oct 18 15:56:56 UTC 2017


#39730: Checking if wp_new_comment() return value is a WP_Error
-----------------------------------------+------------------
 Reporter:  enrico.sorcinelli            |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  4.9
Component:  Comments                     |     Version:  4.8
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:
-----------------------------------------+------------------

Comment (by ryotsun):

 I've fixed the following.

 Replying to [comment:14 peterwilsoncc]:
 > Taking a quick look at the latest patch, I have a few comments:
 >
 > * In `wp-admin/includes/ajax-actions.php`
 >   * can you use `wp_send_json_error()` instead of `wp_die()`
 > * in `tests/phpunit/tests/ajax/ReplytoComment.php`
 >   * there is no need to remove the filter during `tearDown()`, the WP
 test suite does this automatically
 >   * Can you add an docblock to `test_pre_comments_approved()`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39730#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list